Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: src/wasm/ast-decoder.h

Issue 1776813003: adjust for wasm-demo Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 depth = decoder->checked_read_u8(pc, 1, "break depth"); 100 depth = decoder->checked_read_u8(pc, 1, "break depth");
101 length = 1; 101 length = 1;
102 target = nullptr; 102 target = nullptr;
103 } 103 }
104 }; 104 };
105 105
106 struct BlockCountOperand { 106 struct BlockCountOperand {
107 uint32_t count; 107 uint32_t count;
108 int length; 108 int length;
109 inline BlockCountOperand(Decoder* decoder, const byte* pc) { 109 inline BlockCountOperand(Decoder* decoder, const byte* pc) {
110 count = decoder->checked_read_u32(pc, 1, "block count");
111 length = 4;
112 }
113 };
114
115 struct LoopCountOperand {
116 uint32_t count;
117 int length;
118 inline LoopCountOperand(Decoder* decoder, const byte* pc) {
110 count = decoder->checked_read_u8(pc, 1, "block count"); 119 count = decoder->checked_read_u8(pc, 1, "block count");
111 length = 1; 120 length = 1;
112 } 121 }
113 }; 122 };
114 123
115 struct SignatureIndexOperand { 124 struct SignatureIndexOperand {
116 uint32_t index; 125 uint32_t index;
117 FunctionSig* sig; 126 FunctionSig* sig;
118 int length; 127 int length;
119 inline SignatureIndexOperand(Decoder* decoder, const byte* pc) { 128 inline SignatureIndexOperand(Decoder* decoder, const byte* pc) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // Computes the length of the opcode at the given address. 273 // Computes the length of the opcode at the given address.
265 int OpcodeLength(const byte* pc, const byte* end); 274 int OpcodeLength(const byte* pc, const byte* end);
266 275
267 // Computes the arity (number of sub-nodes) of the opcode at the given address. 276 // Computes the arity (number of sub-nodes) of the opcode at the given address.
268 int OpcodeArity(FunctionEnv* env, const byte* pc, const byte* end); 277 int OpcodeArity(FunctionEnv* env, const byte* pc, const byte* end);
269 } // namespace wasm 278 } // namespace wasm
270 } // namespace internal 279 } // namespace internal
271 } // namespace v8 280 } // namespace v8
272 281
273 #endif // V8_WASM_AST_DECODER_H_ 282 #endif // V8_WASM_AST_DECODER_H_
OLDNEW
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698