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

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

Issue 1704033002: [wasm] WasmRunner can run tests with I64 parameters and return value. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@new_wasm_runner
Patch Set: remove DCHECK Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | src/compiler/wasm-linkage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 115f1962b1b5805b8bc60e0790d9c866b17118c7..109bfedd364f57069b811099b9b98136d981049c 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -1484,8 +1484,9 @@ Node* WasmGraphBuilder::BuildWasmCall(wasm::FunctionSig* sig, Node** args) {
args[params + 1] = *effect_;
args[params + 2] = *control_;
- const Operator* op = jsgraph()->common()->Call(
- module_->GetWasmCallDescriptor(jsgraph()->zone(), sig));
+ CallDescriptor* descriptor =
+ module_->GetWasmCallDescriptor(jsgraph()->zone(), sig);
+ const Operator* op = jsgraph()->common()->Call(descriptor);
Node* call = graph()->NewNode(op, static_cast<int>(count), args);
*effect_ = call;
@@ -1909,11 +1910,12 @@ Node* WasmGraphBuilder::String(const char* string) {
Graph* WasmGraphBuilder::graph() { return jsgraph()->graph(); }
void WasmGraphBuilder::Int64LoweringForTesting() {
-#if !WASM_64
- Int64Lowering r(jsgraph()->graph(), jsgraph()->machine(), jsgraph()->common(),
- jsgraph()->zone());
- r.ReduceGraph();
-#endif
+ if (kPointerSize == 4) {
+ Int64Lowering r(jsgraph()->graph(), jsgraph()->machine(),
+ jsgraph()->common(), jsgraph()->zone(),
+ function_signature_);
+ r.LowerGraph();
+ }
}
static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
@@ -2127,8 +2129,11 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
}
// Run the compiler pipeline to generate machine code.
- CallDescriptor* descriptor = const_cast<CallDescriptor*>(
- module_env->GetWasmCallDescriptor(&zone, function.sig));
+ CallDescriptor* descriptor =
+ module_env->GetWasmCallDescriptor(&zone, function.sig);
+ if (kPointerSize == 4) {
+ descriptor = module_env->GetI32WasmCallDescriptor(&zone, descriptor);
+ }
Code::Flags flags = Code::ComputeFlags(Code::WASM_FUNCTION);
// add flags here if a meaningful name is helpful for debugging.
bool debugging =
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | src/compiler/wasm-linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698