Index: src/ia32/lithium-codegen-ia32.cc |
=================================================================== |
--- src/ia32/lithium-codegen-ia32.cc (revision 11394) |
+++ src/ia32/lithium-codegen-ia32.cc (working copy) |
@@ -367,7 +367,9 @@ |
int height = translation_size - environment->parameter_count(); |
WriteTranslation(environment->outer(), translation); |
- int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
+ int closure_id = *info()->closure() != *environment->closure() |
+ ? DefineDeoptimizationLiteral(environment->closure()) |
+ : Translation::kSelfLiteralId; |
switch (environment->frame_type()) { |
case JS_FUNCTION: |
translation->BeginJSFrame(environment->ast_id(), closure_id, height); |
@@ -2694,7 +2696,7 @@ |
void LCodeGen::DoThisFunction(LThisFunction* instr) { |
Register result = ToRegister(instr->result()); |
- __ LoadHeapObject(result, instr->hydrogen()->closure()); |
+ __ mov(result, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
} |
@@ -4401,7 +4403,6 @@ |
void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { |
ASSERT(ToRegister(instr->context()).is(esi)); |
- Heap* heap = isolate()->heap(); |
ElementsKind boilerplate_elements_kind = |
instr->hydrogen()->boilerplate_elements_kind(); |
@@ -4424,9 +4425,7 @@ |
__ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
__ push(FieldOperand(eax, JSFunction::kLiteralsOffset)); |
__ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); |
- // Boilerplate already exists, constant elements are never accessed. |
- // Pass an empty fixed array. |
- __ push(Immediate(Handle<FixedArray>(heap->empty_fixed_array()))); |
+ __ push(Immediate(instr->hydrogen()->constant_elements())); |
fschneider
2012/04/20 14:05:43
This should not be necessary if we share the liter
|
// Pick the right runtime function or stub to call. |
int length = instr->hydrogen()->length(); |