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 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2757 | 2757 |
2758 | 2758 |
2759 void LCodeGen::DoOuterContext(LOuterContext* instr) { | 2759 void LCodeGen::DoOuterContext(LOuterContext* instr) { |
2760 Register context = ToRegister(instr->context()); | 2760 Register context = ToRegister(instr->context()); |
2761 Register result = ToRegister(instr->result()); | 2761 Register result = ToRegister(instr->result()); |
2762 __ lw(result, | 2762 __ lw(result, |
2763 MemOperand(context, Context::SlotOffset(Context::PREVIOUS_INDEX))); | 2763 MemOperand(context, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
2764 } | 2764 } |
2765 | 2765 |
2766 | 2766 |
| 2767 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
| 2768 __ LoadHeapObject(scratch0(), instr->hydrogen()->pairs()); |
| 2769 __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); |
| 2770 // The context is the first argument. |
| 2771 __ Push(cp, scratch0(), scratch1()); |
| 2772 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
| 2773 } |
| 2774 |
| 2775 |
2767 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { | 2776 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { |
2768 Register context = ToRegister(instr->context()); | 2777 Register context = ToRegister(instr->context()); |
2769 Register result = ToRegister(instr->result()); | 2778 Register result = ToRegister(instr->result()); |
2770 __ lw(result, ContextOperand(cp, Context::GLOBAL_INDEX)); | 2779 __ lw(result, ContextOperand(cp, Context::GLOBAL_INDEX)); |
2771 } | 2780 } |
2772 | 2781 |
2773 | 2782 |
2774 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { | 2783 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { |
2775 Register global = ToRegister(instr->global()); | 2784 Register global = ToRegister(instr->global()); |
2776 Register result = ToRegister(instr->result()); | 2785 Register result = ToRegister(instr->result()); |
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4736 ASSERT(!environment->HasBeenRegistered()); | 4745 ASSERT(!environment->HasBeenRegistered()); |
4737 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 4746 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
4738 ASSERT(osr_pc_offset_ == -1); | 4747 ASSERT(osr_pc_offset_ == -1); |
4739 osr_pc_offset_ = masm()->pc_offset(); | 4748 osr_pc_offset_ = masm()->pc_offset(); |
4740 } | 4749 } |
4741 | 4750 |
4742 | 4751 |
4743 #undef __ | 4752 #undef __ |
4744 | 4753 |
4745 } } // namespace v8::internal | 4754 } } // namespace v8::internal |
OLD | NEW |