OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3755 Register result = ToRegister(instr->result()); | 3755 Register result = ToRegister(instr->result()); |
3756 if (info()->IsOptimizing()) { | 3756 if (info()->IsOptimizing()) { |
3757 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3757 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); |
3758 } else { | 3758 } else { |
3759 // If there is no frame, the context must be in esi. | 3759 // If there is no frame, the context must be in esi. |
3760 ASSERT(result.is(esi)); | 3760 ASSERT(result.is(esi)); |
3761 } | 3761 } |
3762 } | 3762 } |
3763 | 3763 |
3764 | 3764 |
3765 void LCodeGen::DoOuterContext(LOuterContext* instr) { | |
3766 Register context = ToRegister(instr->context()); | |
3767 Register result = ToRegister(instr->result()); | |
3768 __ mov(result, | |
3769 Operand(context, Context::SlotOffset(Context::PREVIOUS_INDEX))); | |
3770 } | |
3771 | |
3772 | |
3773 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3765 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3774 ASSERT(ToRegister(instr->context()).is(esi)); | 3766 ASSERT(ToRegister(instr->context()).is(esi)); |
3775 __ push(esi); // The context is the first argument. | 3767 __ push(esi); // The context is the first argument. |
3776 __ push(Immediate(instr->hydrogen()->pairs())); | 3768 __ push(Immediate(instr->hydrogen()->pairs())); |
3777 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); | 3769 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); |
3778 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | 3770 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
3779 } | 3771 } |
3780 | 3772 |
3781 | 3773 |
3782 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { | 3774 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { |
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6356 FixedArray::kHeaderSize - kPointerSize)); | 6348 FixedArray::kHeaderSize - kPointerSize)); |
6357 __ bind(&done); | 6349 __ bind(&done); |
6358 } | 6350 } |
6359 | 6351 |
6360 | 6352 |
6361 #undef __ | 6353 #undef __ |
6362 | 6354 |
6363 } } // namespace v8::internal | 6355 } } // namespace v8::internal |
6364 | 6356 |
6365 #endif // V8_TARGET_ARCH_IA32 | 6357 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |