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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2683 | 2683 |
2684 | 2684 |
2685 void LCodeGen::DoOuterContext(LOuterContext* instr) { | 2685 void LCodeGen::DoOuterContext(LOuterContext* instr) { |
2686 Register context = ToRegister(instr->context()); | 2686 Register context = ToRegister(instr->context()); |
2687 Register result = ToRegister(instr->result()); | 2687 Register result = ToRegister(instr->result()); |
2688 __ mov(result, | 2688 __ mov(result, |
2689 Operand(context, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 2689 Operand(context, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
2690 } | 2690 } |
2691 | 2691 |
2692 | 2692 |
| 2693 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
| 2694 ASSERT(ToRegister(instr->InputAt(0)).is(esi)); |
| 2695 __ push(esi); // The context is the first argument. |
| 2696 __ push(Immediate(instr->hydrogen()->pairs())); |
| 2697 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); |
| 2698 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
| 2699 } |
| 2700 |
| 2701 |
2693 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { | 2702 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { |
2694 Register context = ToRegister(instr->context()); | 2703 Register context = ToRegister(instr->context()); |
2695 Register result = ToRegister(instr->result()); | 2704 Register result = ToRegister(instr->result()); |
2696 __ mov(result, Operand(context, Context::SlotOffset(Context::GLOBAL_INDEX))); | 2705 __ mov(result, Operand(context, Context::SlotOffset(Context::GLOBAL_INDEX))); |
2697 } | 2706 } |
2698 | 2707 |
2699 | 2708 |
2700 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { | 2709 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { |
2701 Register global = ToRegister(instr->global()); | 2710 Register global = ToRegister(instr->global()); |
2702 Register result = ToRegister(instr->result()); | 2711 Register result = ToRegister(instr->result()); |
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4680 this, pointers, Safepoint::kLazyDeopt); | 4689 this, pointers, Safepoint::kLazyDeopt); |
4681 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4690 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4682 } | 4691 } |
4683 | 4692 |
4684 | 4693 |
4685 #undef __ | 4694 #undef __ |
4686 | 4695 |
4687 } } // namespace v8::internal | 4696 } } // namespace v8::internal |
4688 | 4697 |
4689 #endif // V8_TARGET_ARCH_IA32 | 4698 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |