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

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

Issue 1761173003: [wasm] Update {i32,i64}.const to use signed leb128 (Closed) Base URL: http://chromium.googlesource.com/v8/v8.git@master
Patch Set: compile fix + merge namespaces 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 | « src/wasm/asm-wasm-builder.cc ('k') | src/wasm/decoder.h » ('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 28 matching lines...) Expand all
39 inline ImmI8Operand(Decoder* decoder, const byte* pc) { 39 inline ImmI8Operand(Decoder* decoder, const byte* pc) {
40 value = bit_cast<int8_t>(decoder->checked_read_u8(pc, 1, "immi8")); 40 value = bit_cast<int8_t>(decoder->checked_read_u8(pc, 1, "immi8"));
41 length = 1; 41 length = 1;
42 } 42 }
43 }; 43 };
44 44
45 struct ImmI32Operand { 45 struct ImmI32Operand {
46 int32_t value; 46 int32_t value;
47 int length; 47 int length;
48 inline ImmI32Operand(Decoder* decoder, const byte* pc) { 48 inline ImmI32Operand(Decoder* decoder, const byte* pc) {
49 value = bit_cast<int32_t>(decoder->checked_read_u32(pc, 1, "immi32")); 49 value =
50 length = 4; 50 bit_cast<int32_t>(decoder->checked_read_i32v(pc, 1, &length, "immi32"));
51 } 51 }
52 }; 52 };
53 53
54 struct ImmI64Operand { 54 struct ImmI64Operand {
55 int64_t value; 55 int64_t value;
56 int length; 56 int length;
57 inline ImmI64Operand(Decoder* decoder, const byte* pc) { 57 inline ImmI64Operand(Decoder* decoder, const byte* pc) {
58 value = bit_cast<int64_t>(decoder->checked_read_u64(pc, 1, "immi64")); 58 value =
59 length = 8; 59 bit_cast<int64_t>(decoder->checked_read_i64v(pc, 1, &length, "immi64"));
60 } 60 }
61 }; 61 };
62 62
63 struct ImmF32Operand { 63 struct ImmF32Operand {
64 float value; 64 float value;
65 int length; 65 int length;
66 inline ImmF32Operand(Decoder* decoder, const byte* pc) { 66 inline ImmF32Operand(Decoder* decoder, const byte* pc) {
67 value = bit_cast<float>(decoder->checked_read_u32(pc, 1, "immf32")); 67 value = bit_cast<float>(decoder->checked_read_u32(pc, 1, "immf32"));
68 length = 4; 68 length = 4;
69 } 69 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Computes the length of the opcode at the given address. 274 // Computes the length of the opcode at the given address.
275 int OpcodeLength(const byte* pc, const byte* end); 275 int OpcodeLength(const byte* pc, const byte* end);
276 276
277 // Computes the arity (number of sub-nodes) of the opcode at the given address. 277 // Computes the arity (number of sub-nodes) of the opcode at the given address.
278 int OpcodeArity(FunctionEnv* env, const byte* pc, const byte* end); 278 int OpcodeArity(FunctionEnv* env, const byte* pc, const byte* end);
279 } // namespace wasm 279 } // namespace wasm
280 } // namespace internal 280 } // namespace internal
281 } // namespace v8 281 } // namespace v8
282 282
283 #endif // V8_WASM_AST_DECODER_H_ 283 #endif // V8_WASM_AST_DECODER_H_
OLDNEW
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | src/wasm/decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698