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

Side by Side Diff: src/wasm/wasm-macro-gen.h

Issue 2628883006: Revert of [wasm] Enforce that function bodies end with the \"end\" opcode. (Closed)
Patch Set: Created 3 years, 11 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/function-body-decoder.cc ('k') | src/wasm/wasm-text.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_MACRO_GEN_H_ 5 #ifndef V8_WASM_MACRO_GEN_H_
6 #define V8_WASM_MACRO_GEN_H_ 6 #define V8_WASM_MACRO_GEN_H_
7 7
8 #include "src/wasm/wasm-opcodes.h" 8 #include "src/wasm/wasm-opcodes.h"
9 9
10 #include "src/zone/zone-containers.h" 10 #include "src/zone/zone-containers.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 static_cast<byte>((((x) >> 14) & MASK_7) | 0x80), \ 52 static_cast<byte>((((x) >> 14) & MASK_7) | 0x80), \
53 static_cast<byte>((((x) >> 21) & MASK_7) | 0x80), \ 53 static_cast<byte>((((x) >> 21) & MASK_7) | 0x80), \
54 static_cast<byte>((((x) >> 28) & MASK_7)) 54 static_cast<byte>((((x) >> 28) & MASK_7))
55 55
56 // Convenience macros for building Wasm bytecode directly into a byte array. 56 // Convenience macros for building Wasm bytecode directly into a byte array.
57 57
58 //------------------------------------------------------------------------------ 58 //------------------------------------------------------------------------------
59 // Control. 59 // Control.
60 //------------------------------------------------------------------------------ 60 //------------------------------------------------------------------------------
61 #define WASM_NOP kExprNop 61 #define WASM_NOP kExprNop
62 #define WASM_END kExprEnd
63 62
64 #define ARITY_0 0 63 #define ARITY_0 0
65 #define ARITY_1 1 64 #define ARITY_1 1
66 #define ARITY_2 2 65 #define ARITY_2 2
67 #define DEPTH_0 0 66 #define DEPTH_0 0
68 #define DEPTH_1 1 67 #define DEPTH_1 1
69 #define DEPTH_2 2 68 #define DEPTH_2 2
70 #define ARITY_2 2 69 #define ARITY_2 2
71 70
72 #define WASM_BLOCK(...) kExprBlock, kLocalVoid, __VA_ARGS__, kExprEnd 71 #define WASM_BLOCK(...) kExprBlock, kLocalVoid, __VA_ARGS__, kExprEnd
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth) 671 #define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth)
673 #define WASM_BRV_IF(depth, val, cond) \ 672 #define WASM_BRV_IF(depth, val, cond) \
674 val, cond, kExprBrIf, static_cast<byte>(depth) 673 val, cond, kExprBrIf, static_cast<byte>(depth)
675 #define WASM_BRV_IFD(depth, val, cond) \ 674 #define WASM_BRV_IFD(depth, val, cond) \
676 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop 675 val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop
677 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd 676 #define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd
678 #define WASM_BR_TABLEV(val, key, count, ...) \ 677 #define WASM_BR_TABLEV(val, key, count, ...) \
679 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__ 678 val, key, kExprBrTable, U32V_1(count), __VA_ARGS__
680 679
681 #endif // V8_WASM_MACRO_GEN_H_ 680 #endif // V8_WASM_MACRO_GEN_H_
OLDNEW
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | src/wasm/wasm-text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698