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 #ifndef V8_WASM_AST_DECODER_H_ | 5 #ifndef V8_WASM_AST_DECODER_H_ |
6 #define V8_WASM_AST_DECODER_H_ | 6 #define V8_WASM_AST_DECODER_H_ |
7 | 7 |
8 #include "src/signature.h" | 8 #include "src/signature.h" |
9 #include "src/wasm/decoder.h" | 9 #include "src/wasm/decoder.h" |
10 #include "src/wasm/wasm-opcodes.h" | 10 #include "src/wasm/wasm-opcodes.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 MachineType machine_type; | 82 MachineType machine_type; |
83 int length; | 83 int length; |
84 | 84 |
85 inline GlobalIndexOperand(Decoder* decoder, const byte* pc) { | 85 inline GlobalIndexOperand(Decoder* decoder, const byte* pc) { |
86 index = decoder->checked_read_u32v(pc, 1, &length, "global index"); | 86 index = decoder->checked_read_u32v(pc, 1, &length, "global index"); |
87 type = kAstStmt; | 87 type = kAstStmt; |
88 machine_type = MachineType::None(); | 88 machine_type = MachineType::None(); |
89 } | 89 } |
90 }; | 90 }; |
91 | 91 |
92 struct Block; | 92 struct Control; |
93 struct BreakDepthOperand { | 93 struct BreakDepthOperand { |
94 uint32_t depth; | 94 uint32_t depth; |
95 Block* target; | 95 Control* target; |
96 int length; | 96 int length; |
97 inline BreakDepthOperand(Decoder* decoder, const byte* pc) { | 97 inline BreakDepthOperand(Decoder* decoder, const byte* pc) { |
98 depth = decoder->checked_read_u32v(pc, 1, &length, "break depth"); | 98 depth = decoder->checked_read_u32v(pc, 1, &length, "break depth"); |
99 target = nullptr; | 99 target = nullptr; |
100 } | 100 } |
101 }; | 101 }; |
102 | 102 |
103 struct BlockCountOperand { | 103 struct BlockCountOperand { |
104 uint32_t count; | 104 uint32_t count; |
105 int length; | 105 int length; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 int OpcodeLength(const byte* pc, const byte* end); | 225 int OpcodeLength(const byte* pc, const byte* end); |
226 | 226 |
227 // Computes the arity (number of sub-nodes) of the opcode at the given address. | 227 // Computes the arity (number of sub-nodes) of the opcode at the given address. |
228 int OpcodeArity(ModuleEnv* module, FunctionSig* sig, const byte* pc, | 228 int OpcodeArity(ModuleEnv* module, FunctionSig* sig, const byte* pc, |
229 const byte* end); | 229 const byte* end); |
230 } // namespace wasm | 230 } // namespace wasm |
231 } // namespace internal | 231 } // namespace internal |
232 } // namespace v8 | 232 } // namespace v8 |
233 | 233 |
234 #endif // V8_WASM_AST_DECODER_H_ | 234 #endif // V8_WASM_AST_DECODER_H_ |
OLD | NEW |