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 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 | 3144 |
3145 EmitReturn(instr, false); | 3145 EmitReturn(instr, false); |
3146 if (no_frame_start != -1) { | 3146 if (no_frame_start != -1) { |
3147 info()->AddNoFrameRange(no_frame_start, masm_->pc_offset()); | 3147 info()->AddNoFrameRange(no_frame_start, masm_->pc_offset()); |
3148 } | 3148 } |
3149 } | 3149 } |
3150 | 3150 |
3151 | 3151 |
3152 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { | 3152 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
3153 Register result = ToRegister(instr->result()); | 3153 Register result = ToRegister(instr->result()); |
3154 __ mov(result, Operand::ForCell(instr->hydrogen()->cell())); | 3154 __ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle())); |
3155 if (instr->hydrogen()->RequiresHoleCheck()) { | 3155 if (instr->hydrogen()->RequiresHoleCheck()) { |
3156 __ cmp(result, factory()->the_hole_value()); | 3156 __ cmp(result, factory()->the_hole_value()); |
3157 DeoptimizeIf(equal, instr->environment()); | 3157 DeoptimizeIf(equal, instr->environment()); |
3158 } | 3158 } |
3159 } | 3159 } |
3160 | 3160 |
3161 | 3161 |
3162 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 3162 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
3163 ASSERT(ToRegister(instr->context()).is(esi)); | 3163 ASSERT(ToRegister(instr->context()).is(esi)); |
3164 ASSERT(ToRegister(instr->global_object()).is(edx)); | 3164 ASSERT(ToRegister(instr->global_object()).is(edx)); |
3165 ASSERT(ToRegister(instr->result()).is(eax)); | 3165 ASSERT(ToRegister(instr->result()).is(eax)); |
3166 | 3166 |
3167 __ mov(ecx, instr->name()); | 3167 __ mov(ecx, instr->name()); |
3168 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : | 3168 RelocInfo::Mode mode = instr->for_typeof() ? RelocInfo::CODE_TARGET : |
3169 RelocInfo::CODE_TARGET_CONTEXT; | 3169 RelocInfo::CODE_TARGET_CONTEXT; |
3170 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); | 3170 Handle<Code> ic = isolate()->builtins()->LoadIC_Initialize(); |
3171 CallCode(ic, mode, instr); | 3171 CallCode(ic, mode, instr); |
3172 } | 3172 } |
3173 | 3173 |
3174 | 3174 |
3175 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 3175 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
3176 Register value = ToRegister(instr->value()); | 3176 Register value = ToRegister(instr->value()); |
3177 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell(); | 3177 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle(); |
3178 | 3178 |
3179 // If the cell we are storing to contains the hole it could have | 3179 // If the cell we are storing to contains the hole it could have |
3180 // been deleted from the property dictionary. In that case, we need | 3180 // been deleted from the property dictionary. In that case, we need |
3181 // to update the property details in the property dictionary to mark | 3181 // to update the property details in the property dictionary to mark |
3182 // it as no longer deleted. We deoptimize in that case. | 3182 // it as no longer deleted. We deoptimize in that case. |
3183 if (instr->hydrogen()->RequiresHoleCheck()) { | 3183 if (instr->hydrogen()->RequiresHoleCheck()) { |
3184 __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value()); | 3184 __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value()); |
3185 DeoptimizeIf(equal, instr->environment()); | 3185 DeoptimizeIf(equal, instr->environment()); |
3186 } | 3186 } |
3187 | 3187 |
(...skipping 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6395 FixedArray::kHeaderSize - kPointerSize)); | 6395 FixedArray::kHeaderSize - kPointerSize)); |
6396 __ bind(&done); | 6396 __ bind(&done); |
6397 } | 6397 } |
6398 | 6398 |
6399 | 6399 |
6400 #undef __ | 6400 #undef __ |
6401 | 6401 |
6402 } } // namespace v8::internal | 6402 } } // namespace v8::internal |
6403 | 6403 |
6404 #endif // V8_TARGET_ARCH_IA32 | 6404 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |