Revision: 7222
Author: [email protected]
Date: Thu Mar 17 05:34:24 2011
Log: X64: Add the global object as parameter to the GlobalReceiver
instruction
Review URL: http://codereview.chromium.org/6674053
http://code.google.com/p/v8/source/detail?r=7222
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 Thu Mar 17
01:16:12 2011
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Thu Mar 17
05:34:24 2011
@@ -2354,9 +2354,9 @@
void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) {
+ Register global = ToRegister(instr->global());
Register result = ToRegister(instr->result());
- __ movq(result, Operand(rsi,
Context::SlotOffset(Context::GLOBAL_INDEX)));
- __ movq(result, FieldOperand(result,
GlobalObject::kGlobalReceiverOffset));
+ __ movq(result, FieldOperand(global,
GlobalObject::kGlobalReceiverOffset));
}
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Thu Mar 17 01:16:12 2011
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Thu Mar 17 05:34:24 2011
@@ -1199,7 +1199,8 @@
LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) {
- return DefineAsRegister(new LGlobalReceiver);
+ LOperand* global_object = UseRegisterAtStart(instr->value());
+ return DefineAsRegister(new LGlobalReceiver(global_object));
}
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.h Thu Mar 17 01:16:12 2011
+++ /branches/bleeding_edge/src/x64/lithium-x64.h Thu Mar 17 05:34:24 2011
@@ -1331,9 +1331,15 @@
};
-class LGlobalReceiver: public LTemplateInstruction<1, 0, 0> {
+class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> {
public:
+ explicit LGlobalReceiver(LOperand* global_object) {
+ inputs_[0] = global_object;
+ }
+
DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global-receiver")
+
+ LOperand* global() { return InputAt(0); }
};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev