diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-13 16:23:34 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-14 10:37:21 +0000 |
commit | 38a9a29f4f9436cace7f0e7abf9c586057df8a4e (patch) | |
tree | c4e8c458dc595bc0ddb435708fa2229edfd00bd4 /chromium/v8/src/wasm/wasm-opcodes.cc | |
parent | e684a3455bcc29a6e3e66a004e352dea4e1141e7 (diff) | |
download | qtwebengine-chromium-38a9a29f4f9436cace7f0e7abf9c586057df8a4e.tar.gz |
BASELINE: Update Chromium to 73.0.3683.37
Change-Id: I08c9af2948b645f671e5d933aca1f7a90ea372f2
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/v8/src/wasm/wasm-opcodes.cc')
-rw-r--r-- | chromium/v8/src/wasm/wasm-opcodes.cc | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/chromium/v8/src/wasm/wasm-opcodes.cc b/chromium/v8/src/wasm/wasm-opcodes.cc index 274f51a7784..c8dfcf50e61 100644 --- a/chromium/v8/src/wasm/wasm-opcodes.cc +++ b/chromium/v8/src/wasm/wasm-opcodes.cc @@ -158,12 +158,12 @@ const char* WasmOpcodes::OpcodeName(WasmOpcode opcode) { CASE_I64_OP(StoreMem32, "store32") CASE_S128_OP(StoreMem, "store128") - // Non-standard opcodes. + // Exception handling opcodes. CASE_OP(Try, "try") + CASE_OP(Catch, "catch") CASE_OP(Throw, "throw") CASE_OP(Rethrow, "rethrow") - CASE_OP(Catch, "catch") - CASE_OP(CatchAll, "catch_all") + CASE_OP(BrOnExn, "br_on_exn") // asm.js-only opcodes. CASE_F64_OP(Acos, "acos") @@ -264,7 +264,7 @@ const char* WasmOpcodes::OpcodeName(WasmOpcode opcode) { // Atomic operations. CASE_OP(AtomicWake, "atomic_wake") - CASE_I32_OP(AtomicWait, "atomic_wait") + CASE_INT_OP(AtomicWait, "atomic_wait") CASE_UNSIGNED_ALL_OP(AtomicLoad, "atomic_load") CASE_UNSIGNED_ALL_OP(AtomicStore, "atomic_store") CASE_UNSIGNED_ALL_OP(AtomicAdd, "atomic_add") @@ -381,11 +381,18 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& sig) { return os; } -bool IsJSCompatibleSignature(const FunctionSig* sig) { +bool IsJSCompatibleSignature(const FunctionSig* sig, bool has_bigint_feature) { + if (sig->return_count() > 1) { + return false; + } for (auto type : sig->all()) { - if (type == kWasmI64 || type == kWasmS128) return false; + if (!has_bigint_feature && type == kWasmI64) { + return false; + } + + if (type == kWasmS128) return false; } - return sig->return_count() <= 1; + return true; } namespace { @@ -468,20 +475,8 @@ constexpr std::array<WasmOpcodeSig, 256> kAtomicExprSigTable = constexpr std::array<WasmOpcodeSig, 256> kNumericExprSigTable = base::make_array<256>(GetNumericOpcodeSigIndex{}); -// Computes a direct pointer to a cached signature for a simple opcode. -struct GetSimpleOpcodeSig { - constexpr const FunctionSig* operator()(byte opcode) const { -#define CASE(name, opc, sig) opcode == opc ? &kSig_##sig: - return FOREACH_SIMPLE_OPCODE(CASE) nullptr; -#undef CASE - } -}; - } // namespace -const std::array<const FunctionSig*, 256> kSimpleOpcodeSigs = - base::make_array<256>(GetSimpleOpcodeSig{}); - FunctionSig* WasmOpcodes::Signature(WasmOpcode opcode) { switch (opcode >> 8) { case 0: |