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

Unified Diff: src/compiler/x64/code-generator-x64.cc

Issue 530783002: Convert Linkage to use MachineSignature. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 6 years, 3 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/structured-machine-assembler.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index 30c43d6041cee2c72838afe35a93d9ebf12a1075..a489615f3f1c4f91b428a216ba0457d4400feda2 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -226,9 +226,12 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
}
break;
case kArchCallJSFunction: {
- // TODO(jarin) The load of the context should be separated from the call.
Register func = i.InputRegister(0);
- __ movp(rsi, FieldOperand(func, JSFunction::kContextOffset));
+ if (FLAG_debug_code) {
+ // Check the function's context matches the context argument.
+ __ cmpp(rsi, FieldOperand(func, JSFunction::kContextOffset));
+ __ Assert(equal, kWrongFunctionContext);
+ }
__ Call(FieldOperand(func, JSFunction::kCodeEntryOffset));
AddSafepointAndDeopt(instr);
break;
@@ -858,8 +861,9 @@ void CodeGenerator::AssembleReturn() {
} else {
__ movq(rsp, rbp); // Move stack pointer back to frame pointer.
__ popq(rbp); // Pop caller's frame pointer.
- int pop_count =
- descriptor->IsJSFunctionCall() ? descriptor->ParameterCount() : 0;
+ int pop_count = descriptor->IsJSFunctionCall()
+ ? static_cast<int>(descriptor->JSParameterCount())
+ : 0;
__ ret(pop_count * kPointerSize);
}
}
« no previous file with comments | « src/compiler/structured-machine-assembler.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698