OLD | NEW |
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 #include "src/wasm/wasm-opcodes.h" | 5 #include "src/wasm/wasm-opcodes.h" |
6 #include "src/messages.h" | 6 #include "src/messages.h" |
7 #include "src/signature.h" | 7 #include "src/signature.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 static const FunctionSig* kSimpleExprSigs[] = { | 68 static const FunctionSig* kSimpleExprSigs[] = { |
69 nullptr, FOREACH_SIGNATURE(DECLARE_SIG_ENTRY)}; | 69 nullptr, FOREACH_SIGNATURE(DECLARE_SIG_ENTRY)}; |
70 | 70 |
71 static byte kSimpleExprSigTable[256]; | 71 static byte kSimpleExprSigTable[256]; |
72 | 72 |
73 // Initialize the signature table. | 73 // Initialize the signature table. |
74 static void InitSigTable() { | 74 static void InitSigTable() { |
75 #define SET_SIG_TABLE(name, opcode, sig) \ | 75 #define SET_SIG_TABLE(name, opcode, sig) \ |
76 kSimpleExprSigTable[opcode] = static_cast<int>(kSigEnum_##sig) + 1; | 76 kSimpleExprSigTable[opcode] = static_cast<int>(kSigEnum_##sig) + 1; |
77 FOREACH_SIMPLE_OPCODE(SET_SIG_TABLE); | 77 FOREACH_SIMPLE_OPCODE(SET_SIG_TABLE); |
| 78 FOREACH_SIMPLE_MEM_OPCODE(SET_SIG_TABLE); |
78 FOREACH_ASMJS_COMPAT_OPCODE(SET_SIG_TABLE); | 79 FOREACH_ASMJS_COMPAT_OPCODE(SET_SIG_TABLE); |
79 #undef SET_SIG_TABLE | 80 #undef SET_SIG_TABLE |
80 } | 81 } |
81 | 82 |
82 class SigTable { | 83 class SigTable { |
83 public: | 84 public: |
84 SigTable() { | 85 SigTable() { |
85 // TODO(ahaas): Move {InitSigTable} into the class. | 86 // TODO(ahaas): Move {InitSigTable} into the class. |
86 InitSigTable(); | 87 InitSigTable(); |
87 } | 88 } |
(...skipping 27 matching lines...) Expand all Loading... |
115 return MessageTemplate::kNone; | 116 return MessageTemplate::kNone; |
116 } | 117 } |
117 } | 118 } |
118 | 119 |
119 const char* WasmOpcodes::TrapReasonMessage(TrapReason reason) { | 120 const char* WasmOpcodes::TrapReasonMessage(TrapReason reason) { |
120 return MessageTemplate::TemplateString(TrapReasonToMessageId(reason)); | 121 return MessageTemplate::TemplateString(TrapReasonToMessageId(reason)); |
121 } | 122 } |
122 } // namespace wasm | 123 } // namespace wasm |
123 } // namespace internal | 124 } // namespace internal |
124 } // namespace v8 | 125 } // namespace v8 |
OLD | NEW |