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

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

Issue 1911313002: Pass debug name as Vector instead of const char* (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-1
Patch Set: 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 struct WasmName {
53 const char* name; 53 const char* name;
54 uint32_t length; 54 uint32_t length;
55 // TODO(clemensh): Remove whole WasmName, replace by Vector<const char>
titzer 2016/04/22 11:46:30 This should be inline, to prevent a proliferation
Clemens Hammacher 2016/04/22 13:47:54 I will remove the whole WasmName in https://codere
56 Vector<const char> toVec() const { return Vector<const char>(name, length); }
55 }; 57 };
56 58
57 // TODO(titzer): Renumber all the opcodes to fill in holes. 59 // TODO(titzer): Renumber all the opcodes to fill in holes.
58 60
59 // Control expressions and blocks. 61 // Control expressions and blocks.
60 #define FOREACH_CONTROL_OPCODE(V) \ 62 #define FOREACH_CONTROL_OPCODE(V) \
61 V(Nop, 0x00, _) \ 63 V(Nop, 0x00, _) \
62 V(Block, 0x01, _) \ 64 V(Block, 0x01, _) \
63 V(Loop, 0x02, _) \ 65 V(Loop, 0x02, _) \
64 V(If, 0x03, _) \ 66 V(If, 0x03, _) \
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 default: 536 default:
535 return "<unknown>"; 537 return "<unknown>";
536 } 538 }
537 } 539 }
538 }; 540 };
539 } // namespace wasm 541 } // namespace wasm
540 } // namespace internal 542 } // namespace internal
541 } // namespace v8 543 } // namespace v8
542 544
543 #endif // V8_WASM_OPCODES_H_ 545 #endif // V8_WASM_OPCODES_H_
OLDNEW
« src/vector.h ('K') | « src/vector.h ('k') | test/cctest/compiler/codegen-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698