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

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

Issue 1014293002: MIPS: 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/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 2861 matching lines...) Expand 10 before | Expand all | Expand 10 after
2872 } 2872 }
2873 2873
2874 __ Jump(ra); 2874 __ Jump(ra);
2875 2875
2876 if (no_frame_start != -1) { 2876 if (no_frame_start != -1) {
2877 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 2877 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
2878 } 2878 }
2879 } 2879 }
2880 2880
2881 2881
2882 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2883 Register result = ToRegister(instr->result());
2884 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell().handle())));
2885 __ ld(result, FieldMemOperand(at, Cell::kValueOffset));
2886 if (instr->hydrogen()->RequiresHoleCheck()) {
2887 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2888 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(at));
2889 }
2890 }
2891
2892
2893 template <class T> 2882 template <class T>
2894 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { 2883 void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
2895 DCHECK(FLAG_vector_ics); 2884 DCHECK(FLAG_vector_ics);
2896 Register vector_register = ToRegister(instr->temp_vector()); 2885 Register vector_register = ToRegister(instr->temp_vector());
2897 Register slot_register = VectorLoadICDescriptor::SlotRegister(); 2886 Register slot_register = VectorLoadICDescriptor::SlotRegister();
2898 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); 2887 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
2899 DCHECK(slot_register.is(a0)); 2888 DCHECK(slot_register.is(a0));
2900 2889
2901 AllowDeferredHandleDereference vector_structure_check; 2890 AllowDeferredHandleDereference vector_structure_check;
2902 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2891 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
(...skipping 15 matching lines...) Expand all
2918 if (FLAG_vector_ics) { 2907 if (FLAG_vector_ics) {
2919 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2908 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2920 } 2909 }
2921 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2910 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2922 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 2911 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode,
2923 PREMONOMORPHIC).code(); 2912 PREMONOMORPHIC).code();
2924 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2913 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2925 } 2914 }
2926 2915
2927 2916
2928 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2929 Register value = ToRegister(instr->value());
2930 Register cell = scratch0();
2931
2932 // Load the cell.
2933 __ li(cell, Operand(instr->hydrogen()->cell().handle()));
2934
2935 // If the cell we are storing to contains the hole it could have
2936 // been deleted from the property dictionary. In that case, we need
2937 // to update the property details in the property dictionary to mark
2938 // it as no longer deleted.
2939 if (instr->hydrogen()->RequiresHoleCheck()) {
2940 // We use a temp to check the payload.
2941 Register payload = ToRegister(instr->temp());
2942 __ ld(payload, FieldMemOperand(cell, Cell::kValueOffset));
2943 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2944 DeoptimizeIf(eq, instr, Deoptimizer::kHole, payload, Operand(at));
2945 }
2946
2947 // Store the value.
2948 __ sd(value, FieldMemOperand(cell, Cell::kValueOffset));
2949 // Cells are always rescanned, so no write barrier here.
2950 }
2951
2952
2953 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2917 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2954 Register context = ToRegister(instr->context()); 2918 Register context = ToRegister(instr->context());
2955 Register result = ToRegister(instr->result()); 2919 Register result = ToRegister(instr->result());
2956 2920
2957 __ ld(result, ContextOperand(context, instr->slot_index())); 2921 __ ld(result, ContextOperand(context, instr->slot_index()));
2958 if (instr->hydrogen()->RequiresHoleCheck()) { 2922 if (instr->hydrogen()->RequiresHoleCheck()) {
2959 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2923 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2960 2924
2961 if (instr->hydrogen()->DeoptimizesOnHole()) { 2925 if (instr->hydrogen()->DeoptimizesOnHole()) {
2962 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(at)); 2926 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(at));
(...skipping 3090 matching lines...) Expand 10 before | Expand all | Expand 10 after
6053 __ li(at, scope_info); 6017 __ li(at, scope_info);
6054 __ Push(at, ToRegister(instr->function())); 6018 __ Push(at, ToRegister(instr->function()));
6055 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6019 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6056 RecordSafepoint(Safepoint::kNoLazyDeopt); 6020 RecordSafepoint(Safepoint::kNoLazyDeopt);
6057 } 6021 }
6058 6022
6059 6023
6060 #undef __ 6024 #undef __
6061 6025
6062 } } // namespace v8::internal 6026 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | src/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698