| 1 |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
| 2 |
* vim: set ts=8 sts=2 et sw=2 tw=80: |
| 3 |
* |
| 4 |
* Copyright 2016 Mozilla Foundation |
| 5 |
* |
| 6 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 |
* you may not use this file except in compliance with the License. |
| 8 |
* You may obtain a copy of the License at |
| 9 |
* |
| 10 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 11 |
* |
| 12 |
* Unless required by applicable law or agreed to in writing, software |
| 13 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 14 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 |
* See the License for the specific language governing permissions and |
| 16 |
* limitations under the License. |
| 17 |
*/ |
| 18 |
|
| 19 |
// This is an INTERNAL header for Wasm baseline compiler: inline methods in the |
| 20 |
// compiler for basic code generation. |
| 21 |
|
| 22 |
#ifndef wasm_wasm_baseline_codegen_inl_h |
| 23 |
#define wasm_wasm_baseline_codegen_inl_h |
| 24 |
|
| 25 |
// The templates for register management must be defined by the time we use the |
| 26 |
// templated emitters, below. |
| 27 |
#include "wasm/WasmBCRegMgmt-inl.h" |
| 28 |
|
| 29 |
namespace js { |
| 30 |
namespace wasm { |
| 31 |
|
| 32 |
////////////////////////////////////////////////////////////////////////////// |
| 33 |
// |
| 34 |
// Register-to-register moves. |
| 35 |
|
| 36 |
void BaseCompiler::moveI32(RegI32 src, RegI32 dest) { |
| 37 |
if (src != dest) { |
| 38 |
masm.move32(src, dest); |
| 39 |
} |
| 40 |
} |
| 41 |
|
| 42 |
void BaseCompiler::moveI64(RegI64 src, RegI64 dest) { |
| 43 |
if (src != dest) { |
| 44 |
masm.move64(src, dest); |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
void BaseCompiler::moveRef(RegRef src, RegRef dest) { |
| 49 |
if (src != dest) { |
| 50 |
masm.movePtr(src, dest); |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
void BaseCompiler::movePtr(RegPtr src, RegPtr dest) { |
| 55 |
if (src != dest) { |
| 56 |
masm.movePtr(src, dest); |
| 57 |
} |
| 58 |
} |
| 59 |
|
| 60 |
void BaseCompiler::moveF64(RegF64 src, RegF64 dest) { |
| 61 |
if (src != dest) { |
| 62 |
masm.moveDouble(src, dest); |
| 63 |
} |
| 64 |
} |
| 65 |
|
| 66 |
void BaseCompiler::moveF32(RegF32 src, RegF32 dest) { |
| 67 |
if (src != dest) { |
| 68 |
masm.moveFloat32(src, dest); |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
#ifdef ENABLE_WASM_SIMD |
| 73 |
void BaseCompiler::moveV128(RegV128 src, RegV128 dest) { |
| 74 |
if (src != dest) { |
| 75 |
masm.moveSimd128(src, dest); |
| 76 |
} |
| 77 |
} |
| 78 |
#endif |
| 79 |
|
| 80 |
template <> |
| 81 |
inline void BaseCompiler::move<RegI32>(RegI32 src, RegI32 dest) { |
| 82 |
moveI32(src, dest); |
| 83 |
} |
| 84 |
|
| 85 |
template <> |
| 86 |
inline void BaseCompiler::move<RegI64>(RegI64 src, RegI64 dest) { |
| 87 |
moveI64(src, dest); |
| 88 |
} |
| 89 |
|
| 90 |
template <> |
| 91 |
inline void BaseCompiler::move<RegF32>(RegF32 src, RegF32 dest) { |
| 92 |
moveF32(src, dest); |
| 93 |
} |
| 94 |
|
| 95 |
template <> |
| 96 |
inline void BaseCompiler::move<RegF64>(RegF64 src, RegF64 dest) { |
| 97 |
moveF64(src, dest); |
| 98 |
} |
| 99 |
|
| 100 |
template <> |
| 101 |
inline void BaseCompiler::move<RegRef>(RegRef src, RegRef dest) { |
| 102 |
moveRef(src, dest); |
| 103 |
} |
| 104 |
|
| 105 |
template <> |
| 106 |
inline void BaseCompiler::move<RegPtr>(RegPtr src, RegPtr dest) { |
| 107 |
movePtr(src, dest); |
| 108 |
} |
| 109 |
|
| 110 |
#ifdef ENABLE_WASM_SIMD |
| 111 |
template <> |
| 112 |
inline void BaseCompiler::move<RegV128>(RegV128 src, RegV128 dest) { |
| 113 |
moveV128(src, dest); |
| 114 |
} |
| 115 |
#endif |
| 116 |
|
| 117 |
////////////////////////////////////////////////////////////////////////////// |
| 118 |
// |
| 119 |
// Constant loads. |
| 120 |
|
| 121 |
void BaseCompiler::moveImm32(int32_t v, RegI32 dest) { |
| 122 |
masm.move32(Imm32(v), dest); |
| 123 |
} |
| 124 |
|
| 125 |
void BaseCompiler::moveImm64(int64_t v, RegI64 dest) { |
| 126 |
masm.move64(Imm64(v), dest); |
| 127 |
} |
| 128 |
|
| 129 |
void BaseCompiler::moveImmRef(intptr_t v, RegRef dest) { |
| 130 |
masm.movePtr(ImmWord(v), dest); |
| 131 |
} |
| 132 |
|
| 133 |
////////////////////////////////////////////////////////////////////////////// |
| 134 |
// |
| 135 |
// Calls. |
| 136 |
|
| 137 |
RegI32 BaseCompiler::captureReturnedI32() { |
| 138 |
RegI32 r = RegI32(ReturnReg); |
| 139 |
MOZ_ASSERT(isAvailableI32(r)); |
| 140 |
needI32(r); |
| 141 |
#if defined(JS_64BIT) |
| 142 |
masm.widenInt32(r); |
| 143 |
#endif |
| 144 |
return r; |
| 145 |
} |
| 146 |
|
| 147 |
RegI64 BaseCompiler::captureReturnedI64() { |
| 148 |
RegI64 r = RegI64(ReturnReg64); |
| 149 |
MOZ_ASSERT(isAvailableI64(r)); |
| 150 |
needI64(r); |
| 151 |
return r; |
| 152 |
} |
| 153 |
|
| 154 |
RegF32 BaseCompiler::captureReturnedF32(const FunctionCall& call) { |
| 155 |
RegF32 r = RegF32(ReturnFloat32Reg); |
| 156 |
MOZ_ASSERT(isAvailableF32(r)); |
| 157 |
needF32(r); |
| 158 |
#if defined(JS_CODEGEN_ARM) |
| 159 |
if (call.usesSystemAbi && !call.hardFP) { |
| 160 |
masm.ma_vxfer(ReturnReg, r); |
| 161 |
} |
| 162 |
#endif |
| 163 |
return r; |
| 164 |
} |
| 165 |
|
| 166 |
RegF64 BaseCompiler::captureReturnedF64(const FunctionCall& call) { |
| 167 |
RegF64 r = RegF64(ReturnDoubleReg); |
| 168 |
MOZ_ASSERT(isAvailableF64(r)); |
| 169 |
needF64(r); |
| 170 |
#if defined(JS_CODEGEN_ARM) |
| 171 |
if (call.usesSystemAbi && !call.hardFP) { |
| 172 |
masm.ma_vxfer(ReturnReg64.low, ReturnReg64.high, r); |
| 173 |
} |
| 174 |
#endif |
| 175 |
return r; |
| 176 |
} |
| 177 |
|
| 178 |
#ifdef ENABLE_WASM_SIMD |
| 179 |
RegV128 BaseCompiler::captureReturnedV128(const FunctionCall& call) { |
| 180 |
RegV128 r = RegV128(ReturnSimd128Reg); |
| 181 |
MOZ_ASSERT(isAvailableV128(r)); |
| 182 |
needV128(r); |
| 183 |
return r; |
| 184 |
} |
| 185 |
#endif |
| 186 |
|
| 187 |
RegRef BaseCompiler::captureReturnedRef() { |
| 188 |
RegRef r = RegRef(ReturnReg); |
| 189 |
MOZ_ASSERT(isAvailableRef(r)); |
| 190 |
needRef(r); |
| 191 |
return r; |
| 192 |
} |
| 193 |
|
| 194 |
////////////////////////////////////////////////////////////////////////////// |
| 195 |
// |
| 196 |
// Miscellaneous. |
| 197 |
|
| 198 |
void BaseCompiler::trap(Trap t) const { masm.wasmTrap(t, trapSiteDesc()); } |
| 199 |
|
| 200 |
void BaseCompiler::cmp64Set(Assembler::Condition cond, RegI64 lhs, RegI64 rhs, |
| 201 |
RegI32 dest) { |
| 202 |
#if defined(JS_PUNBOX64) |
| 203 |
masm.cmpPtrSet(cond, lhs.reg, rhs.reg, dest); |
| 204 |
#else |
| 205 |
// TODO / OPTIMIZE (Bug 1316822): This is pretty branchy, we should be |
| 206 |
// able to do better. |
| 207 |
Label done, condTrue; |
| 208 |
masm.branch64(cond, lhs, rhs, &condTrue); |
| 209 |
moveImm32(0, dest); |
| 210 |
masm.jump(&done); |
| 211 |
masm.bind(&condTrue); |
| 212 |
moveImm32(1, dest); |
| 213 |
masm.bind(&done); |
| 214 |
#endif |
| 215 |
} |
| 216 |
|
| 217 |
[[nodiscard]] bool BaseCompiler::supportsRoundInstruction(RoundingMode mode) { |
| 218 |
return Assembler::HasRoundInstruction(mode); |
| 219 |
} |
| 220 |
|
| 221 |
void BaseCompiler::roundF32(RoundingMode roundingMode, RegF32 f0) { |
| 222 |
masm.nearbyIntFloat32(roundingMode, f0, f0); |
| 223 |
} |
| 224 |
|
| 225 |
void BaseCompiler::roundF64(RoundingMode roundingMode, RegF64 f0) { |
| 226 |
masm.nearbyIntDouble(roundingMode, f0, f0); |
| 227 |
} |
| 228 |
|
| 229 |
void BaseCompiler::branchTo(Assembler::DoubleCondition c, RegF64 lhs, |
| 230 |
RegF64 rhs, Label* l) { |
| 231 |
masm.branchDouble(c, lhs, rhs, l); |
| 232 |
} |
| 233 |
|
| 234 |
void BaseCompiler::branchTo(Assembler::DoubleCondition c, RegF32 lhs, |
| 235 |
RegF32 rhs, Label* l) { |
| 236 |
masm.branchFloat(c, lhs, rhs, l); |
| 237 |
} |
| 238 |
|
| 239 |
void BaseCompiler::branchTo(Assembler::Condition c, RegI32 lhs, RegI32 rhs, |
| 240 |
Label* l) { |
| 241 |
masm.branch32(c, lhs, rhs, l); |
| 242 |
} |
| 243 |
|
| 244 |
void BaseCompiler::branchTo(Assembler::Condition c, RegI32 lhs, Imm32 rhs, |
| 245 |
Label* l) { |
| 246 |
masm.branch32(c, lhs, rhs, l); |
| 247 |
} |
| 248 |
|
| 249 |
void BaseCompiler::branchTo(Assembler::Condition c, RegI64 lhs, RegI64 rhs, |
| 250 |
Label* l) { |
| 251 |
masm.branch64(c, lhs, rhs, l); |
| 252 |
} |
| 253 |
|
| 254 |
void BaseCompiler::branchTo(Assembler::Condition c, RegI64 lhs, Imm64 rhs, |
| 255 |
Label* l) { |
| 256 |
masm.branch64(c, lhs, rhs, l); |
| 257 |
} |
| 258 |
|
| 259 |
void BaseCompiler::branchTo(Assembler::Condition c, RegRef lhs, ImmWord rhs, |
| 260 |
Label* l) { |
| 261 |
masm.branchPtr(c, lhs, rhs, l); |
| 262 |
} |
| 263 |
|
| 264 |
////////////////////////////////////////////////////////////////////////////// |
| 265 |
// |
| 266 |
// Templated emitters |
| 267 |
|
| 268 |
template <> |
| 269 |
inline BaseCompiler& BaseCompiler::selectCompiler<BaseCompiler>() { |
| 270 |
return *this; |
| 271 |
} |
| 272 |
|
| 273 |
template <> |
| 274 |
inline MacroAssembler& BaseCompiler::selectCompiler<MacroAssembler>() { |
| 275 |
return masm; |
| 276 |
} |
| 277 |
|
| 278 |
template <typename SourceType, typename DestType> |
| 279 |
void BaseCompiler::emitUnop(void (*op)(MacroAssembler& masm, SourceType rs, |
| 280 |
DestType rd)) { |
| 281 |
SourceType rs = pop<SourceType>(); |
| 282 |
DestType rd = need<DestType>(); |
| 283 |
op(masm, rs, rd); |
| 284 |
free(rs); |
| 285 |
push(rd); |
| 286 |
} |
| 287 |
|
| 288 |
// Specialize narrowing reuse. Consumers may assume that rs.reg==rd on 64-bit |
| 289 |
// platforms, or rs.low==rd on 32-bit platforms. |
| 290 |
template <> |
| 291 |
inline void BaseCompiler::emitUnop(void (*op)(MacroAssembler& masm, RegI64 rs, |
| 292 |
RegI32 rd)) { |
| 293 |
RegI64 rs = pop<RegI64>(); |
| 294 |
RegI32 rd = fromI64(rs); |
| 295 |
op(masm, rs, rd); |
| 296 |
freeI64Except(rs, rd); |
| 297 |
push(rd); |
| 298 |
} |
| 299 |
|
| 300 |
template <typename CompilerType, typename RegType> |
| 301 |
void BaseCompiler::emitUnop(void (*op)(CompilerType& compiler, RegType rsd)) { |
| 302 |
RegType rsd = pop<RegType>(); |
| 303 |
op(selectCompiler<CompilerType>(), rsd); |
| 304 |
push(rsd); |
| 305 |
} |
| 306 |
|
| 307 |
template <typename RegType, typename TempType> |
| 308 |
void BaseCompiler::emitUnop(void (*op)(BaseCompiler& bc, RegType rsd, |
| 309 |
TempType rt), |
| 310 |
TempType (*getSpecializedTemp)(BaseCompiler& bc)) { |
| 311 |
RegType rsd = pop<RegType>(); |
| 312 |
TempType temp = getSpecializedTemp(*this); |
| 313 |
op(*this, rsd, temp); |
| 314 |
maybeFree(temp); |
| 315 |
push(rsd); |
| 316 |
} |
| 317 |
|
| 318 |
template <typename SourceType, typename DestType, typename TempType> |
| 319 |
void BaseCompiler::emitUnop(void (*op)(MacroAssembler& masm, SourceType rs, |
| 320 |
DestType rd, TempType temp)) { |
| 321 |
SourceType rs = pop<SourceType>(); |
| 322 |
DestType rd = need<DestType>(); |
| 323 |
TempType temp = need<TempType>(); |
| 324 |
op(masm, rs, rd, temp); |
| 325 |
free(rs); |
| 326 |
free(temp); |
| 327 |
push(rd); |
| 328 |
} |
| 329 |
|
| 330 |
template <typename SourceType, typename DestType, typename ImmType> |
| 331 |
void BaseCompiler::emitUnop(ImmType immediate, |
| 332 |
void (*op)(MacroAssembler&, ImmType, SourceType, |
| 333 |
DestType)) { |
| 334 |
SourceType rs = pop<SourceType>(); |
| 335 |
DestType rd = need<DestType>(); |
| 336 |
op(masm, immediate, rs, rd); |
| 337 |
free(rs); |
| 338 |
push(rd); |
| 339 |
} |
| 340 |
|
| 341 |
template <typename CompilerType, typename RhsType, typename LhsDestType> |
| 342 |
void BaseCompiler::emitBinop(void (*op)(CompilerType& masm, RhsType src, |
| 343 |
LhsDestType srcDest)) { |
| 344 |
RhsType rs = pop<RhsType>(); |
| 345 |
LhsDestType rsd = pop<LhsDestType>(); |
| 346 |
op(selectCompiler<CompilerType>(), rs, rsd); |
| 347 |
free(rs); |
| 348 |
push(rsd); |
| 349 |
} |
| 350 |
|
| 351 |
template <typename CompilerType, typename ValType> |
| 352 |
void BaseCompiler::emitTernary(void (*op)(CompilerType&, ValType src0, |
| 353 |
ValType src1, ValType srcDest)) { |
| 354 |
ValType src2 = pop<ValType>(); |
| 355 |
ValType src1 = pop<ValType>(); |
| 356 |
ValType srcDest = pop<ValType>(); |
| 357 |
op(selectCompiler<CompilerType>(), src1, src2, srcDest); |
| 358 |
free(src2); |
| 359 |
free(src1); |
| 360 |
push(srcDest); |
| 361 |
} |
| 362 |
|
| 363 |
template <typename CompilerType, typename ValType> |
| 364 |
void BaseCompiler::emitTernary(void (*op)(CompilerType&, ValType src0, |
| 365 |
ValType src1, ValType srcDest, |
| 366 |
ValType temp)) { |
| 367 |
ValType src2 = pop<ValType>(); |
| 368 |
ValType src1 = pop<ValType>(); |
| 369 |
ValType srcDest = pop<ValType>(); |
| 370 |
ValType temp = need<ValType>(); |
| 371 |
op(selectCompiler<CompilerType>(), src1, src2, srcDest, temp); |
| 372 |
free(temp); |
| 373 |
free(src2); |
| 374 |
free(src1); |
| 375 |
push(srcDest); |
| 376 |
} |
| 377 |
|
| 378 |
template <typename CompilerType, typename ValType> |
| 379 |
void BaseCompiler::emitTernaryResultLast(void (*op)(CompilerType&, ValType src0, |
| 380 |
ValType src1, |
| 381 |
ValType srcDest)) { |
| 382 |
ValType srcDest = pop<ValType>(); |
| 383 |
ValType src2 = pop<ValType>(); |
| 384 |
ValType src1 = pop<ValType>(); |
| 385 |
op(selectCompiler<CompilerType>(), src1, src2, srcDest); |
| 386 |
free(src2); |
| 387 |
free(src1); |
| 388 |
push(srcDest); |
| 389 |
} |
| 390 |
|
| 391 |
template <typename RhsDestType, typename LhsType> |
| 392 |
void BaseCompiler::emitBinop(void (*op)(MacroAssembler& masm, RhsDestType src, |
| 393 |
LhsType srcDest, RhsDestOp)) { |
| 394 |
RhsDestType rsd = pop<RhsDestType>(); |
| 395 |
LhsType rs = pop<LhsType>(); |
| 396 |
op(masm, rsd, rs, RhsDestOp::True); |
| 397 |
free(rs); |
| 398 |
push(rsd); |
| 399 |
} |
| 400 |
|
| 401 |
template <typename RhsType, typename LhsDestType, typename TempType> |
| 402 |
void BaseCompiler::emitBinop(void (*op)(MacroAssembler& masm, RhsType rs, |
| 403 |
LhsDestType rsd, TempType temp)) { |
| 404 |
RhsType rs = pop<RhsType>(); |
| 405 |
LhsDestType rsd = pop<LhsDestType>(); |
| 406 |
TempType temp = need<TempType>(); |
| 407 |
op(masm, rs, rsd, temp); |
| 408 |
free(rs); |
| 409 |
free(temp); |
| 410 |
push(rsd); |
| 411 |
} |
| 412 |
|
| 413 |
template <typename RhsType, typename LhsDestType, typename TempType1, |
| 414 |
typename TempType2> |
| 415 |
void BaseCompiler::emitBinop(void (*op)(MacroAssembler& masm, RhsType rs, |
| 416 |
LhsDestType rsd, TempType1 temp1, |
| 417 |
TempType2 temp2)) { |
| 418 |
RhsType rs = pop<RhsType>(); |
| 419 |
LhsDestType rsd = pop<LhsDestType>(); |
| 420 |
TempType1 temp1 = need<TempType1>(); |
| 421 |
TempType2 temp2 = need<TempType2>(); |
| 422 |
op(masm, rs, rsd, temp1, temp2); |
| 423 |
free(rs); |
| 424 |
free(temp1); |
| 425 |
free(temp2); |
| 426 |
push(rsd); |
| 427 |
} |
| 428 |
|
| 429 |
template <typename RhsType, typename LhsDestType, typename ImmType> |
| 430 |
void BaseCompiler::emitBinop(ImmType immediate, |
| 431 |
void (*op)(MacroAssembler&, ImmType, RhsType, |
| 432 |
LhsDestType)) { |
| 433 |
RhsType rs = pop<RhsType>(); |
| 434 |
LhsDestType rsd = pop<LhsDestType>(); |
| 435 |
op(masm, immediate, rs, rsd); |
| 436 |
free(rs); |
| 437 |
push(rsd); |
| 438 |
} |
| 439 |
|
| 440 |
template <typename RhsType, typename LhsDestType, typename ImmType, |
| 441 |
typename TempType1, typename TempType2> |
| 442 |
void BaseCompiler::emitBinop(ImmType immediate, |
| 443 |
void (*op)(MacroAssembler&, ImmType, RhsType, |
| 444 |
LhsDestType, TempType1 temp1, |
| 445 |
TempType2 temp2)) { |
| 446 |
RhsType rs = pop<RhsType>(); |
| 447 |
LhsDestType rsd = pop<LhsDestType>(); |
| 448 |
TempType1 temp1 = need<TempType1>(); |
| 449 |
TempType2 temp2 = need<TempType2>(); |
| 450 |
op(masm, immediate, rs, rsd, temp1, temp2); |
| 451 |
free(rs); |
| 452 |
free(temp1); |
| 453 |
free(temp2); |
| 454 |
push(rsd); |
| 455 |
} |
| 456 |
|
| 457 |
template <typename CompilerType1, typename CompilerType2, typename RegType, |
| 458 |
typename ImmType> |
| 459 |
void BaseCompiler::emitBinop(void (*op)(CompilerType1& compiler, RegType rs, |
| 460 |
RegType rsd), |
| 461 |
void (*opConst)(CompilerType2& compiler, ImmType c, |
| 462 |
RegType rsd), |
| 463 |
RegType (BaseCompiler::*rhsPopper)()) { |
| 464 |
ImmType c; |
| 465 |
if (popConst(&c)) { |
| 466 |
RegType rsd = pop<RegType>(); |
| 467 |
opConst(selectCompiler<CompilerType2>(), c, rsd); |
| 468 |
push(rsd); |
| 469 |
} else { |
| 470 |
RegType rs = rhsPopper ? (this->*rhsPopper)() : pop<RegType>(); |
| 471 |
RegType rsd = pop<RegType>(); |
| 472 |
op(selectCompiler<CompilerType1>(), rs, rsd); |
| 473 |
free(rs); |
| 474 |
push(rsd); |
| 475 |
} |
| 476 |
} |
| 477 |
|
| 478 |
template <typename R> |
| 479 |
bool BaseCompiler::emitInstanceCallOp(const SymbolicAddressSignature& fn, |
| 480 |
R reader) { |
| 481 |
if (!reader()) { |
| 482 |
return false; |
| 483 |
} |
| 484 |
if (deadCode_) { |
| 485 |
return true; |
| 486 |
} |
| 487 |
return emitInstanceCall(fn); |
| 488 |
} |
| 489 |
|
| 490 |
template <typename A1, typename R> |
| 491 |
bool BaseCompiler::emitInstanceCallOp(const SymbolicAddressSignature& fn, |
| 492 |
R reader) { |
| 493 |
A1 arg = 0; |
| 494 |
if (!reader(&arg)) { |
| 495 |
return false; |
| 496 |
} |
| 497 |
if (deadCode_) { |
| 498 |
return true; |
| 499 |
} |
| 500 |
push(arg); |
| 501 |
return emitInstanceCall(fn); |
| 502 |
} |
| 503 |
|
| 504 |
template <typename A1, typename A2, typename R> |
| 505 |
bool BaseCompiler::emitInstanceCallOp(const SymbolicAddressSignature& fn, |
| 506 |
R reader) { |
| 507 |
A1 arg1 = 0; |
| 508 |
A2 arg2 = 0; |
| 509 |
if (!reader(&arg1, &arg2)) { |
| 510 |
return false; |
| 511 |
} |
| 512 |
if (deadCode_) { |
| 513 |
return true; |
| 514 |
} |
| 515 |
// Note order of arguments must be the same as for the reader. |
| 516 |
push(arg1); |
| 517 |
push(arg2); |
| 518 |
return emitInstanceCall(fn); |
| 519 |
} |
| 520 |
|
| 521 |
} // namespace wasm |
| 522 |
} // namespace js |
| 523 |
|
| 524 |
#endif // wasm_wasm_baseline_codegen_inl_h |