X64 Crankshaft: Add DoOuterContext to x64 lithium.
Review URL: http://codereview.chromium.org/6570008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
791c9e2c21
commit
c61ac2cd84
@ -2205,6 +2205,15 @@ void LCodeGen::DoContext(LContext* instr) {
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoOuterContext(LOuterContext* instr) {
|
||||
Register context = ToRegister(instr->context());
|
||||
Register result = ToRegister(instr->result());
|
||||
__ movq(result,
|
||||
Operand(context, Context::SlotOffset(Context::CLOSURE_INDEX)));
|
||||
__ movq(result, FieldOperand(result, JSFunction::kContextOffset));
|
||||
}
|
||||
|
||||
|
||||
void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
|
||||
Register result = ToRegister(instr->result());
|
||||
__ movq(result, GlobalObjectOperand());
|
||||
|
@ -1190,8 +1190,8 @@ LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
||||
|
||||
|
||||
LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
|
||||
Abort("Unimplemented: DoOuterContext");
|
||||
return NULL;
|
||||
LOperand* context = UseRegisterAtStart(instr->value());
|
||||
return DefineAsRegister(new LOuterContext(context));
|
||||
}
|
||||
|
||||
|
||||
|
@ -129,6 +129,7 @@ class LCodeGen;
|
||||
V(NumberUntagD) \
|
||||
V(ObjectLiteral) \
|
||||
V(OsrEntry) \
|
||||
V(OuterContext) \
|
||||
V(Parameter) \
|
||||
V(PixelArrayLength) \
|
||||
V(Power) \
|
||||
@ -1280,6 +1281,18 @@ class LContext: public LTemplateInstruction<1, 0, 0> {
|
||||
};
|
||||
|
||||
|
||||
class LOuterContext: public LTemplateInstruction<1, 1, 0> {
|
||||
public:
|
||||
explicit LOuterContext(LOperand* context) {
|
||||
inputs_[0] = context;
|
||||
}
|
||||
|
||||
DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
|
||||
|
||||
LOperand* context() { return InputAt(0); }
|
||||
};
|
||||
|
||||
|
||||
class LGlobalObject: public LTemplateInstruction<1, 0, 0> {
|
||||
public:
|
||||
DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object")
|
||||
|
Loading…
Reference in New Issue
Block a user