| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2048 ASSERT(ToRegister(instr->result()).is(eax)); | 2048 ASSERT(ToRegister(instr->result()).is(eax)); |
| 2049 | 2049 |
| 2050 __ mov(ecx, instr->name()); | 2050 __ mov(ecx, instr->name()); |
| 2051 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : | 2051 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : |
| 2052 RelocInfo::CODE_TARGET_CONTEXT; | 2052 RelocInfo::CODE_TARGET_CONTEXT; |
| 2053 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); | 2053 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
| 2054 CallCode(ic, mode, instr); | 2054 CallCode(ic, mode, instr); |
| 2055 } | 2055 } |
| 2056 | 2056 |
| 2057 | 2057 |
| 2058 void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { | 2058 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2059 Register value = ToRegister(instr->InputAt(0)); | 2059 Register value = ToRegister(instr->InputAt(0)); |
| 2060 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); | 2060 Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); |
| 2061 | 2061 |
| 2062 // If the cell we are storing to contains the hole it could have | 2062 // If the cell we are storing to contains the hole it could have |
| 2063 // been deleted from the property dictionary. In that case, we need | 2063 // been deleted from the property dictionary. In that case, we need |
| 2064 // to update the property details in the property dictionary to mark | 2064 // to update the property details in the property dictionary to mark |
| 2065 // it as no longer deleted. We deoptimize in that case. | 2065 // it as no longer deleted. We deoptimize in that case. |
| 2066 if (instr->hydrogen()->check_hole_value()) { | 2066 if (instr->hydrogen()->check_hole_value()) { |
| 2067 __ cmp(cell_operand, factory()->the_hole_value()); | 2067 __ cmp(cell_operand, factory()->the_hole_value()); |
| 2068 DeoptimizeIf(equal, instr->environment()); | 2068 DeoptimizeIf(equal, instr->environment()); |
| 2069 } | 2069 } |
| 2070 | 2070 |
| 2071 // Store the value. | 2071 // Store the value. |
| 2072 __ mov(cell_operand, value); | 2072 __ mov(cell_operand, value); |
| 2073 } | 2073 } |
| 2074 | 2074 |
| 2075 | 2075 |
| 2076 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { |
| 2077 ASSERT(ToRegister(instr->context()).is(esi)); |
| 2078 ASSERT(ToRegister(instr->global_object()).is(edx)); |
| 2079 ASSERT(ToRegister(instr->value()).is(eax)); |
| 2080 |
| 2081 __ mov(ecx, instr->name()); |
| 2082 Handle<Code> ic = isolate()->builtins()->StoreIC_Initialize(); |
| 2083 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); |
| 2084 } |
| 2085 |
| 2086 |
| 2076 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2087 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2077 Register context = ToRegister(instr->context()); | 2088 Register context = ToRegister(instr->context()); |
| 2078 Register result = ToRegister(instr->result()); | 2089 Register result = ToRegister(instr->result()); |
| 2079 __ mov(result, ContextOperand(context, instr->slot_index())); | 2090 __ mov(result, ContextOperand(context, instr->slot_index())); |
| 2080 } | 2091 } |
| 2081 | 2092 |
| 2082 | 2093 |
| 2083 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { | 2094 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
| 2084 Register context = ToRegister(instr->context()); | 2095 Register context = ToRegister(instr->context()); |
| 2085 Register value = ToRegister(instr->value()); | 2096 Register value = ToRegister(instr->value()); |
| (...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4116 ASSERT(osr_pc_offset_ == -1); | 4127 ASSERT(osr_pc_offset_ == -1); |
| 4117 osr_pc_offset_ = masm()->pc_offset(); | 4128 osr_pc_offset_ = masm()->pc_offset(); |
| 4118 } | 4129 } |
| 4119 | 4130 |
| 4120 | 4131 |
| 4121 #undef __ | 4132 #undef __ |
| 4122 | 4133 |
| 4123 } } // namespace v8::internal | 4134 } } // namespace v8::internal |
| 4124 | 4135 |
| 4125 #endif // V8_TARGET_ARCH_IA32 | 4136 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |