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

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

Issue 1016803002: 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 | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.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 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
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 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 2975
2976 __ Jump(lr); 2976 __ Jump(lr);
2977 2977
2978 if (no_frame_start != -1) { 2978 if (no_frame_start != -1) {
2979 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 2979 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
2980 } 2980 }
2981 } 2981 }
2982 } 2982 }
2983 2983
2984 2984
2985 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2986 Register result = ToRegister(instr->result());
2987 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell().handle())));
2988 __ ldr(result, FieldMemOperand(ip, Cell::kValueOffset));
2989 if (instr->hydrogen()->RequiresHoleCheck()) {
2990 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
2991 __ cmp(result, ip);
2992 DeoptimizeIf(eq, instr, Deoptimizer::kHole);
2993 }
2994 }
2995
2996
2997 template <class T> 2985 template <class T>
2998 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { 2986 void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
2999 DCHECK(FLAG_vector_ics); 2987 DCHECK(FLAG_vector_ics);
3000 Register vector_register = ToRegister(instr->temp_vector()); 2988 Register vector_register = ToRegister(instr->temp_vector());
3001 Register slot_register = VectorLoadICDescriptor::SlotRegister(); 2989 Register slot_register = VectorLoadICDescriptor::SlotRegister();
3002 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); 2990 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
3003 DCHECK(slot_register.is(r0)); 2991 DCHECK(slot_register.is(r0));
3004 2992
3005 AllowDeferredHandleDereference vector_structure_check; 2993 AllowDeferredHandleDereference vector_structure_check;
3006 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2994 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
(...skipping 15 matching lines...) Expand all
3022 if (FLAG_vector_ics) { 3010 if (FLAG_vector_ics) {
3023 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 3011 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
3024 } 3012 }
3025 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 3013 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
3026 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 3014 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode,
3027 PREMONOMORPHIC).code(); 3015 PREMONOMORPHIC).code();
3028 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3016 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3029 } 3017 }
3030 3018
3031 3019
3032 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
3033 Register value = ToRegister(instr->value());
3034 Register cell = scratch0();
3035
3036 // Load the cell.
3037 __ mov(cell, Operand(instr->hydrogen()->cell().handle()));
3038
3039 // If the cell we are storing to contains the hole it could have
3040 // been deleted from the property dictionary. In that case, we need
3041 // to update the property details in the property dictionary to mark
3042 // it as no longer deleted.
3043 if (instr->hydrogen()->RequiresHoleCheck()) {
3044 // We use a temp to check the payload (CompareRoot might clobber ip).
3045 Register payload = ToRegister(instr->temp());
3046 __ ldr(payload, FieldMemOperand(cell, Cell::kValueOffset));
3047 __ CompareRoot(payload, Heap::kTheHoleValueRootIndex);
3048 DeoptimizeIf(eq, instr, Deoptimizer::kHole);
3049 }
3050
3051 // Store the value.
3052 __ str(value, FieldMemOperand(cell, Cell::kValueOffset));
3053 // Cells are always rescanned, so no write barrier here.
3054 }
3055
3056
3057 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 3020 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
3058 Register context = ToRegister(instr->context()); 3021 Register context = ToRegister(instr->context());
3059 Register result = ToRegister(instr->result()); 3022 Register result = ToRegister(instr->result());
3060 __ ldr(result, ContextOperand(context, instr->slot_index())); 3023 __ ldr(result, ContextOperand(context, instr->slot_index()));
3061 if (instr->hydrogen()->RequiresHoleCheck()) { 3024 if (instr->hydrogen()->RequiresHoleCheck()) {
3062 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 3025 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
3063 __ cmp(result, ip); 3026 __ cmp(result, ip);
3064 if (instr->hydrogen()->DeoptimizesOnHole()) { 3027 if (instr->hydrogen()->DeoptimizesOnHole()) {
3065 DeoptimizeIf(eq, instr, Deoptimizer::kHole); 3028 DeoptimizeIf(eq, instr, Deoptimizer::kHole);
3066 } else { 3029 } else {
(...skipping 2898 matching lines...) Expand 10 before | Expand all | Expand 10 after
5965 __ Push(scope_info); 5928 __ Push(scope_info);
5966 __ push(ToRegister(instr->function())); 5929 __ push(ToRegister(instr->function()));
5967 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5930 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5968 RecordSafepoint(Safepoint::kNoLazyDeopt); 5931 RecordSafepoint(Safepoint::kNoLazyDeopt);
5969 } 5932 }
5970 5933
5971 5934
5972 #undef __ 5935 #undef __
5973 5936
5974 } } // namespace v8::internal 5937 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698