OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/wasm/wasm-interpreter.h" | 5 #include "src/wasm/wasm-interpreter.h" |
6 | 6 |
7 #include "src/utils.h" | 7 #include "src/utils.h" |
8 #include "src/wasm/decoder.h" | 8 #include "src/wasm/decoder.h" |
9 #include "src/wasm/function-body-decoder.h" | 9 #include "src/wasm/function-body-decoder.h" |
10 #include "src/wasm/wasm-external-refs.h" | 10 #include "src/wasm/wasm-external-refs.h" |
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 continue; | 1348 continue; |
1349 } | 1349 } |
1350 case kExprUnreachable: { | 1350 case kExprUnreachable: { |
1351 DoTrap(kTrapUnreachable, pc); | 1351 DoTrap(kTrapUnreachable, pc); |
1352 return CommitPc(pc); | 1352 return CommitPc(pc); |
1353 } | 1353 } |
1354 case kExprEnd: { | 1354 case kExprEnd: { |
1355 blocks_.pop_back(); | 1355 blocks_.pop_back(); |
1356 break; | 1356 break; |
1357 } | 1357 } |
1358 case kExprI8Const: { | |
1359 ImmI8Operand operand(&decoder, code->at(pc)); | |
1360 Push(pc, WasmVal(operand.value)); | |
1361 len = 1 + operand.length; | |
1362 break; | |
1363 } | |
1364 case kExprI32Const: { | 1358 case kExprI32Const: { |
1365 ImmI32Operand operand(&decoder, code->at(pc)); | 1359 ImmI32Operand operand(&decoder, code->at(pc)); |
1366 Push(pc, WasmVal(operand.value)); | 1360 Push(pc, WasmVal(operand.value)); |
1367 len = 1 + operand.length; | 1361 len = 1 + operand.length; |
1368 break; | 1362 break; |
1369 } | 1363 } |
1370 case kExprI64Const: { | 1364 case kExprI64Const: { |
1371 ImmI64Operand operand(&decoder, code->at(pc)); | 1365 ImmI64Operand operand(&decoder, code->at(pc)); |
1372 Push(pc, WasmVal(operand.value)); | 1366 Push(pc, WasmVal(operand.value)); |
1373 len = 1 + operand.length; | 1367 len = 1 + operand.length; |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1888 | 1882 |
1889 ControlTransferMap WasmInterpreter::ComputeControlTransfersForTesting( | 1883 ControlTransferMap WasmInterpreter::ComputeControlTransfersForTesting( |
1890 Zone* zone, const byte* start, const byte* end) { | 1884 Zone* zone, const byte* start, const byte* end) { |
1891 ControlTransfers targets(zone, nullptr, start, end); | 1885 ControlTransfers targets(zone, nullptr, start, end); |
1892 return targets.map_; | 1886 return targets.map_; |
1893 } | 1887 } |
1894 | 1888 |
1895 } // namespace wasm | 1889 } // namespace wasm |
1896 } // namespace internal | 1890 } // namespace internal |
1897 } // namespace v8 | 1891 } // namespace v8 |
OLD | NEW |