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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 2571813002: [wasm] TrapIf and TrapUnless TurboFan operators implemented on ia32. (Closed)
Patch Set: Rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 35d94ba04bee1d5d4b96fdbf61f931b477a15a7b..d7a222c1ae2c7257f9aeba7c58dab729e9e48ef4 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -168,8 +168,8 @@ class WasmTrapHelper : public ZoneObject {
return TrapIfEq64(reason, node, 0, position);
}
- int32_t GetFunctionIdForTrap(wasm::TrapReason reason) {
- int32_t trap_id;
+ Runtime::FunctionId GetFunctionIdForTrap(wasm::TrapReason reason) {
+ Runtime::FunctionId trap_id;
if (builder_->module_ && !builder_->module_->instance->context.is_null()) {
trap_id = wasm::WasmOpcodes::TrapReasonToFunctionId(reason);
} else {
@@ -181,7 +181,7 @@ class WasmTrapHelper : public ZoneObject {
return trap_id;
}
-#if V8_TARGET_ARCH_X64
+#if V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32
#define WASM_TRAP_IF_SUPPORTED
#endif
@@ -197,7 +197,7 @@ class WasmTrapHelper : public ZoneObject {
builder_->SetSourcePosition(node, position);
return;
}
-#endif // V8_TARGET_ARCH_X64
+#endif // WASM_TRAP_IF_SUPPORTED
BuildTrapIf(reason, cond, true, position);
}
@@ -214,7 +214,7 @@ class WasmTrapHelper : public ZoneObject {
builder_->SetSourcePosition(node, position);
return;
}
-#endif // V8_TARGET_ARCH_X64
+#endif // WASM_TRAP_IF_SUPPORTED
BuildTrapIf(reason, cond, false, position);
}

Powered by Google App Engine
This is Rietveld 408576698