Commit 7e38b1bb authored by whesse@chromium.org's avatar whesse@chromium.org

X64 Crankshaft: Start using LCallFunction, remove errors in it.

Review URL: http://codereview.chromium.org/6529053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8e1796a4
...@@ -2142,12 +2142,12 @@ void LCodeGen::DoCallNamed(LCallNamed* instr) { ...@@ -2142,12 +2142,12 @@ void LCodeGen::DoCallNamed(LCallNamed* instr) {
void LCodeGen::DoCallFunction(LCallFunction* instr) { void LCodeGen::DoCallFunction(LCallFunction* instr) {
ASSERT(ToRegister(instr->context()).is(rsi));
ASSERT(ToRegister(instr->result()).is(rax)); ASSERT(ToRegister(instr->result()).is(rax));
int arity = instr->arity(); int arity = instr->arity();
CallFunctionStub stub(arity, NOT_IN_LOOP, RECEIVER_MIGHT_BE_VALUE); CallFunctionStub stub(arity, NOT_IN_LOOP, RECEIVER_MIGHT_BE_VALUE);
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
__ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
__ Drop(1); __ Drop(1);
} }
......
...@@ -1219,8 +1219,9 @@ LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) { ...@@ -1219,8 +1219,9 @@ LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) { LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
Abort("Unimplemented: %s", "DoCallFunction"); argument_count_ -= instr->argument_count();
return NULL; LCallFunction* result = new LCallFunction();
return MarkAsCall(DefineFixed(result, rax), instr);
} }
......
...@@ -1313,16 +1313,13 @@ class LCallNamed: public LTemplateInstruction<1, 0, 0> { ...@@ -1313,16 +1313,13 @@ class LCallNamed: public LTemplateInstruction<1, 0, 0> {
}; };
class LCallFunction: public LTemplateInstruction<1, 1, 0> { class LCallFunction: public LTemplateInstruction<1, 0, 0> {
public: public:
explicit LCallFunction(LOperand* context) { LCallFunction() {}
inputs_[0] = context;
}
DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function") DECLARE_CONCRETE_INSTRUCTION(CallFunction, "call-function")
DECLARE_HYDROGEN_ACCESSOR(CallFunction) DECLARE_HYDROGEN_ACCESSOR(CallFunction)
LOperand* context() { return inputs_[0]; }
int arity() const { return hydrogen()->argument_count() - 2; } int arity() const { return hydrogen()->argument_count() - 2; }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment