Revision: 6826
Author: [email protected]
Date: Wed Feb 16 07:45:45 2011
Log: X64 Crankshaft: Start using LCallFunction, remove errors in it.
Review URL: http://codereview.chromium.org/6529053
http://code.google.com/p/v8/source/detail?r=6826
Modified:
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
/branches/bleeding_edge/src/x64/lithium-x64.cc
/branches/bleeding_edge/src/x64/lithium-x64.h
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Wed Feb 16
07:15:52 2011
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Wed Feb 16
07:45:45 2011
@@ -2142,12 +2142,12 @@
void LCodeGen::DoCallFunction(LCallFunction* instr) {
- ASSERT(ToRegister(instr->context()).is(rsi));
ASSERT(ToRegister(instr->result()).is(rax));
int arity = instr->arity();
CallFunctionStub stub(arity, NOT_IN_LOOP, RECEIVER_MIGHT_BE_VALUE);
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
+ __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
__ Drop(1);
}
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Wed Feb 16 07:15:20 2011
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Wed Feb 16 07:45:45 2011
@@ -1219,8 +1219,9 @@
LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
- Abort("Unimplemented: %s", "DoCallFunction");
- return NULL;
+ argument_count_ -= instr->argument_count();
+ LCallFunction* result = new LCallFunction();
+ return MarkAsCall(DefineFixed(result, rax), instr);
}
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.h Wed Feb 16 07:15:52 2011
+++ /branches/bleeding_edge/src/x64/lithium-x64.h Wed Feb 16 07:45:45 2011
@@ -1313,16 +1313,13 @@
};
-class LCallFunction: public LTemplateInstruction<1, 1, 0> {
+class LCallFunction: public LTemplateInstruction<1, 0, 0> {
public:
- explicit LCallFunction(LOperand* context) {
- inputs_[0] = context;
- }
+ LCallFunction() {}
DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
DECLARE_HYDROGEN_ACCESSOR(CallFunction)
- LOperand* context() { return inputs_[0]; }
int arity() const { return hydrogen()->argument_count() - 2; }
};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev