Chromium Code Reviews| Index: src/ia32/lithium-codegen-ia32.cc |
| =================================================================== |
| --- src/ia32/lithium-codegen-ia32.cc (revision 7187) |
| +++ src/ia32/lithium-codegen-ia32.cc (working copy) |
| @@ -2021,7 +2021,7 @@ |
| } |
| -void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { |
| +void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
| Register result = ToRegister(instr->result()); |
| __ mov(result, Operand::Cell(instr->hydrogen()->cell())); |
| if (instr->hydrogen()->check_hole_value()) { |
| @@ -2031,6 +2031,19 @@ |
| } |
| +void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| + ASSERT(ToRegister(instr->context()).is(esi)); |
| + ASSERT(ToRegister(instr->result()).is(eax)); |
| + |
| + __ mov(eax, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); |
|
fschneider
2011/03/16 10:28:18
You could consider making LoadGlobalGeneric take t
Søren Thygesen Gjesse
2011/03/17 07:52:27
Done.
|
| + __ mov(ecx, instr->name()); |
| + RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : |
| + RelocInfo::CODE_TARGET_CONTEXT; |
| + Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
| + CallCode(ic, mode, instr); |
| +} |
| + |
| + |
| void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
| Register value = ToRegister(instr->InputAt(0)); |
| Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); |