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

Side by Side Diff: src/wasm/wasm-opcodes.h

Issue 1910213004: [wasm] Replace WasmName by Vector<const char> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-2
Patch Set: nicer bounds check Created 4 years, 8 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/wasm-module.cc ('k') | test/cctest/wasm/wasm-run-utils.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_OPCODES_H_ 5 #ifndef V8_WASM_OPCODES_H_
6 #define V8_WASM_OPCODES_H_ 6 #define V8_WASM_OPCODES_H_
7 7
8 #include "src/machine-type.h" 8 #include "src/machine-type.h"
9 #include "src/signature.h" 9 #include "src/signature.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const LocalType kAstI32 = MachineRepresentation::kWord32; 42 const LocalType kAstI32 = MachineRepresentation::kWord32;
43 const LocalType kAstI64 = MachineRepresentation::kWord64; 43 const LocalType kAstI64 = MachineRepresentation::kWord64;
44 const LocalType kAstF32 = MachineRepresentation::kFloat32; 44 const LocalType kAstF32 = MachineRepresentation::kFloat32;
45 const LocalType kAstF64 = MachineRepresentation::kFloat64; 45 const LocalType kAstF64 = MachineRepresentation::kFloat64;
46 // We use kTagged here because kNone is already used by kAstStmt. 46 // We use kTagged here because kNone is already used by kAstStmt.
47 const LocalType kAstEnd = MachineRepresentation::kTagged; 47 const LocalType kAstEnd = MachineRepresentation::kTagged;
48 48
49 typedef Signature<LocalType> FunctionSig; 49 typedef Signature<LocalType> FunctionSig;
50 std::ostream& operator<<(std::ostream& os, const FunctionSig& function); 50 std::ostream& operator<<(std::ostream& os, const FunctionSig& function);
51 51
52 struct WasmName { 52 typedef Vector<const char> WasmName;
53 const char* name;
54 uint32_t length;
55 // TODO(clemensh): Remove whole WasmName, replace by Vector<const char>
56 inline Vector<const char> toVec() const {
57 return Vector<const char>(name, length);
58 }
59 };
60 53
61 // TODO(titzer): Renumber all the opcodes to fill in holes. 54 // TODO(titzer): Renumber all the opcodes to fill in holes.
62 55
63 // Control expressions and blocks. 56 // Control expressions and blocks.
64 #define FOREACH_CONTROL_OPCODE(V) \ 57 #define FOREACH_CONTROL_OPCODE(V) \
65 V(Nop, 0x00, _) \ 58 V(Nop, 0x00, _) \
66 V(Block, 0x01, _) \ 59 V(Block, 0x01, _) \
67 V(Loop, 0x02, _) \ 60 V(Loop, 0x02, _) \
68 V(If, 0x03, _) \ 61 V(If, 0x03, _) \
69 V(IfElse, 0x04, _) \ 62 V(IfElse, 0x04, _) \
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 default: 512 default:
520 return "<unknown>"; 513 return "<unknown>";
521 } 514 }
522 } 515 }
523 }; 516 };
524 } // namespace wasm 517 } // namespace wasm
525 } // namespace internal 518 } // namespace internal
526 } // namespace v8 519 } // namespace v8
527 520
528 #endif // V8_WASM_OPCODES_H_ 521 #endif // V8_WASM_OPCODES_H_
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698