Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Side by Side Diff: src/x87/lithium-codegen-x87.cc

Issue 1013543004: X87: Remove PropertyCell space (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/x87/lithium-x87.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 __ bind(&no_padding); 3132 __ bind(&no_padding);
3133 } 3133 }
3134 3134
3135 EmitReturn(instr, false); 3135 EmitReturn(instr, false);
3136 if (no_frame_start != -1) { 3136 if (no_frame_start != -1) {
3137 info()->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 3137 info()->AddNoFrameRange(no_frame_start, masm_->pc_offset());
3138 } 3138 }
3139 } 3139 }
3140 3140
3141 3141
3142 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
3143 Register result = ToRegister(instr->result());
3144 __ mov(result, Operand::ForCell(instr->hydrogen()->cell().handle()));
3145 if (instr->hydrogen()->RequiresHoleCheck()) {
3146 __ cmp(result, factory()->the_hole_value());
3147 DeoptimizeIf(equal, instr, Deoptimizer::kHole);
3148 }
3149 }
3150
3151
3152 template <class T> 3142 template <class T>
3153 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { 3143 void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
3154 DCHECK(FLAG_vector_ics); 3144 DCHECK(FLAG_vector_ics);
3155 Register vector_register = ToRegister(instr->temp_vector()); 3145 Register vector_register = ToRegister(instr->temp_vector());
3156 Register slot_register = VectorLoadICDescriptor::SlotRegister(); 3146 Register slot_register = VectorLoadICDescriptor::SlotRegister();
3157 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); 3147 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
3158 DCHECK(slot_register.is(eax)); 3148 DCHECK(slot_register.is(eax));
3159 3149
3160 AllowDeferredHandleDereference vector_structure_check; 3150 AllowDeferredHandleDereference vector_structure_check;
3161 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 3151 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
(...skipping 15 matching lines...) Expand all
3177 if (FLAG_vector_ics) { 3167 if (FLAG_vector_ics) {
3178 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3168 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3179 } 3169 }
3180 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3170 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3181 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 3171 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode,
3182 PREMONOMORPHIC).code(); 3172 PREMONOMORPHIC).code();
3183 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3173 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3184 } 3174 }
3185 3175
3186 3176
3187 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
3188 Register value = ToRegister(instr->value());
3189 Handle<PropertyCell> cell_handle = instr->hydrogen()->cell().handle();
3190
3191 // If the cell we are storing to contains the hole it could have
3192 // been deleted from the property dictionary. In that case, we need
3193 // to update the property details in the property dictionary to mark
3194 // it as no longer deleted. We deoptimize in that case.
3195 if (instr->hydrogen()->RequiresHoleCheck()) {
3196 __ cmp(Operand::ForCell(cell_handle), factory()->the_hole_value());
3197 DeoptimizeIf(equal, instr, Deoptimizer::kHole);
3198 }
3199
3200 // Store the value.
3201 __ mov(Operand::ForCell(cell_handle), value);
3202 // Cells are always rescanned, so no write barrier here.
3203 }
3204
3205
3206 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 3177 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
3207 Register context = ToRegister(instr->context()); 3178 Register context = ToRegister(instr->context());
3208 Register result = ToRegister(instr->result()); 3179 Register result = ToRegister(instr->result());
3209 __ mov(result, ContextOperand(context, instr->slot_index())); 3180 __ mov(result, ContextOperand(context, instr->slot_index()));
3210 3181
3211 if (instr->hydrogen()->RequiresHoleCheck()) { 3182 if (instr->hydrogen()->RequiresHoleCheck()) {
3212 __ cmp(result, factory()->the_hole_value()); 3183 __ cmp(result, factory()->the_hole_value());
3213 if (instr->hydrogen()->DeoptimizesOnHole()) { 3184 if (instr->hydrogen()->DeoptimizesOnHole()) {
3214 DeoptimizeIf(equal, instr, Deoptimizer::kHole); 3185 DeoptimizeIf(equal, instr, Deoptimizer::kHole);
3215 } else { 3186 } else {
(...skipping 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after
6413 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6384 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6414 RecordSafepoint(Safepoint::kNoLazyDeopt); 6385 RecordSafepoint(Safepoint::kNoLazyDeopt);
6415 } 6386 }
6416 6387
6417 6388
6418 #undef __ 6389 #undef __
6419 6390
6420 } } // namespace v8::internal 6391 } } // namespace v8::internal
6421 6392
6422 #endif // V8_TARGET_ARCH_X87 6393 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698