OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/signature.h" | 5 #include "src/signature.h" |
6 | 6 |
7 #include "src/bit-vector.h" | 7 #include "src/bit-vector.h" |
8 #include "src/flags.h" | 8 #include "src/flags.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
11 | 11 |
12 #include "src/wasm/ast-decoder.h" | 12 #include "src/wasm/ast-decoder.h" |
13 #include "src/wasm/decoder.h" | 13 #include "src/wasm/decoder.h" |
14 #include "src/wasm/wasm-module.h" | 14 #include "src/wasm/wasm-module.h" |
15 #include "src/wasm/wasm-opcodes.h" | 15 #include "src/wasm/wasm-opcodes.h" |
16 | 16 |
17 #include "src/ostreams.h" | 17 #include "src/ostreams.h" |
18 | 18 |
19 #include "src/compiler/wasm-compiler.h" | 19 #include "src/compiler/wasm-compiler.h" |
20 | |
Mircea Trofin
2016/07/22 00:15:58
why remove this space?
| |
21 namespace v8 { | 20 namespace v8 { |
22 namespace internal { | 21 namespace internal { |
23 namespace wasm { | 22 namespace wasm { |
24 | 23 |
25 #if DEBUG | 24 #if DEBUG |
26 #define TRACE(...) \ | 25 #define TRACE(...) \ |
27 do { \ | 26 do { \ |
28 if (FLAG_trace_wasm_decoder) PrintF(__VA_ARGS__); \ | 27 if (FLAG_trace_wasm_decoder) PrintF(__VA_ARGS__); \ |
29 } while (false) | 28 } while (false) |
30 #else | 29 #else |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1023 if (FLAG_wasm_jit_prototype) { | 1022 if (FLAG_wasm_jit_prototype) { |
1024 JITSingleFunctionOperand operand(this, pc_); | 1023 JITSingleFunctionOperand operand(this, pc_); |
1025 if (Validate(pc_, operand)) { | 1024 if (Validate(pc_, operand)) { |
1026 Value index = Pop(2, kAstI32); | 1025 Value index = Pop(2, kAstI32); |
1027 Value length = Pop(1, kAstI32); | 1026 Value length = Pop(1, kAstI32); |
1028 Value base = Pop(0, kAstI32); | 1027 Value base = Pop(0, kAstI32); |
1029 TFNode* call = | 1028 TFNode* call = |
1030 BUILD(JITSingleFunction, base.node, length.node, index.node, | 1029 BUILD(JITSingleFunction, base.node, length.node, index.node, |
1031 operand.sig_index, operand.sig, position()); | 1030 operand.sig_index, operand.sig, position()); |
1032 Push(kAstI32, call); | 1031 Push(kAstI32, call); |
1033 break; | |
1034 } | 1032 } |
1033 len = 1 + operand.length; | |
1034 break; | |
1035 } | 1035 } |
1036 } | 1036 } |
1037 default: | 1037 default: |
1038 error("Invalid opcode"); | 1038 error("Invalid opcode"); |
1039 return; | 1039 return; |
1040 } | 1040 } |
1041 } // end complex bytecode | 1041 } // end complex bytecode |
1042 | 1042 |
1043 #if DEBUG | 1043 #if DEBUG |
1044 if (FLAG_trace_wasm_decoder) { | 1044 if (FLAG_trace_wasm_decoder) { |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1683 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, | 1683 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, |
1684 const byte* start, const byte* end) { | 1684 const byte* start, const byte* end) { |
1685 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; | 1685 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; |
1686 WasmFullDecoder decoder(zone, nullptr, body); | 1686 WasmFullDecoder decoder(zone, nullptr, body); |
1687 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); | 1687 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); |
1688 } | 1688 } |
1689 | 1689 |
1690 } // namespace wasm | 1690 } // namespace wasm |
1691 } // namespace internal | 1691 } // namespace internal |
1692 } // namespace v8 | 1692 } // namespace v8 |
OLD | NEW |