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

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: Removed const CallDescriptor changes again. 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
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 115f1962b1b5805b8bc60e0790d9c866b17118c7..196baa467c882ad6ad44cf277e0d4f885083657b 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;
@@ -1908,11 +1909,12 @@ Node* WasmGraphBuilder::String(const char* string) {
Graph* WasmGraphBuilder::graph() { return jsgraph()->graph(); }
-void WasmGraphBuilder::Int64LoweringForTesting() {
+void WasmGraphBuilder::Int64LoweringForTesting(
titzer 2016/02/18 12:06:22 Why don't you just use the function_signature from
ahaas 2016/02/18 13:00:18 Done.
+ Signature<MachineRepresentation>* signature) {
#if !WASM_64
ahaas 2016/02/18 13:00:18 I also replaced the #if !WASM_64 here.
Int64Lowering r(jsgraph()->graph(), jsgraph()->machine(), jsgraph()->common(),
- jsgraph()->zone());
- r.ReduceGraph();
+ jsgraph()->zone(), signature);
+ r.LowerGraph();
#endif
}
@@ -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 !WASM_64
titzer 2016/02/18 12:06:22 You should use if (kPointerSize == 4) here; the WA
ahaas 2016/02/18 13:00:18 Done. I changed that also in Int64LoweringForTest
+ descriptor = module_env->GetI32WasmCallDescriptor(&zone, descriptor);
+#endif
Code::Flags flags = Code::ComputeFlags(Code::WASM_FUNCTION);
// add flags here if a meaningful name is helpful for debugging.
bool debugging =

Powered by Google App Engine
This is Rietveld 408576698