X64: Add the global object as parameter to the GlobalReceiver instruction
Review URL: http://codereview.chromium.org/6674053 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
c83f0a715e
commit
e6c7ca3642
@ -2354,9 +2354,9 @@ void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
|
||||
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1199,7 +1199,8 @@ LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) {
|
||||
return DefineAsRegister(new LGlobalReceiver);
|
||||
LOperand* global_object = UseRegisterAtStart(instr->value());
|
||||
return DefineAsRegister(new LGlobalReceiver(global_object));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1331,9 +1331,15 @@ class LGlobalObject: public LTemplateInstruction<1, 0, 0> {
|
||||
};
|
||||
|
||||
|
||||
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); }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user