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

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

Issue 2049513003: [wasm] Support undefined indirect table entries, behind a flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 enum WasmOpcode { 321 enum WasmOpcode {
322 // Declare expression opcodes. 322 // Declare expression opcodes.
323 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode, 323 #define DECLARE_NAMED_ENUM(name, opcode, sig) kExpr##name = opcode,
324 FOREACH_OPCODE(DECLARE_NAMED_ENUM) 324 FOREACH_OPCODE(DECLARE_NAMED_ENUM)
325 #undef DECLARE_NAMED_ENUM 325 #undef DECLARE_NAMED_ENUM
326 }; 326 };
327 327
328 // The reason for a trap. 328 // The reason for a trap.
329 #define FOREACH_WASM_TRAPREASON(V) \ 329 #define FOREACH_WASM_TRAPREASON(V) \
330 V(TrapUnreachable) \ 330 V(TrapUnreachable) \
331 V(TrapMemOutOfBounds) \ 331 V(TrapMemOutOfBounds) \
332 V(TrapDivByZero) \ 332 V(TrapDivByZero) \
333 V(TrapDivUnrepresentable) \ 333 V(TrapDivUnrepresentable) \
334 V(TrapRemByZero) \ 334 V(TrapRemByZero) \
335 V(TrapFloatUnrepresentable) \ 335 V(TrapFloatUnrepresentable) \
336 V(TrapFuncInvalid) \ 336 V(TrapFuncInvalid) \
337 V(TrapFuncSigMismatch) 337 V(TrapFuncSigMismatch) \
338 V(TrapDefaultFuncCall)
338 339
339 enum TrapReason { 340 enum TrapReason {
340 #define DECLARE_ENUM(name) k##name, 341 #define DECLARE_ENUM(name) k##name,
341 FOREACH_WASM_TRAPREASON(DECLARE_ENUM) 342 FOREACH_WASM_TRAPREASON(DECLARE_ENUM)
342 kTrapCount 343 kTrapCount
343 #undef DECLARE_ENUM 344 #undef DECLARE_ENUM
344 }; 345 };
345 346
346 // A collection of opcode-related static methods. 347 // A collection of opcode-related static methods.
347 class WasmOpcodes { 348 class WasmOpcodes {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 default: 512 default:
512 return "<unknown>"; 513 return "<unknown>";
513 } 514 }
514 } 515 }
515 }; 516 };
516 } // namespace wasm 517 } // namespace wasm
517 } // namespace internal 518 } // namespace internal
518 } // namespace v8 519 } // namespace v8
519 520
520 #endif // V8_WASM_OPCODES_H_ 521 #endif // V8_WASM_OPCODES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698