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

Side by Side Diff: src/mips/lithium-codegen-mips.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 | « no previous file | src/mips/lithium-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after
2895 } 2895 }
2896 2896
2897 __ Jump(ra); 2897 __ Jump(ra);
2898 2898
2899 if (no_frame_start != -1) { 2899 if (no_frame_start != -1) {
2900 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 2900 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
2901 } 2901 }
2902 } 2902 }
2903 2903
2904 2904
2905 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) {
2906 Register result = ToRegister(instr->result());
2907 __ li(at, Operand(Handle<Object>(instr->hydrogen()->cell().handle())));
2908 __ lw(result, FieldMemOperand(at, Cell::kValueOffset));
2909 if (instr->hydrogen()->RequiresHoleCheck()) {
2910 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2911 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(at));
2912 }
2913 }
2914
2915
2916 template <class T> 2905 template <class T>
2917 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { 2906 void LCodeGen::EmitVectorLoadICRegisters(T* instr) {
2918 DCHECK(FLAG_vector_ics); 2907 DCHECK(FLAG_vector_ics);
2919 Register vector_register = ToRegister(instr->temp_vector()); 2908 Register vector_register = ToRegister(instr->temp_vector());
2920 Register slot_register = VectorLoadICDescriptor::SlotRegister(); 2909 Register slot_register = VectorLoadICDescriptor::SlotRegister();
2921 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); 2910 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister()));
2922 DCHECK(slot_register.is(a0)); 2911 DCHECK(slot_register.is(a0));
2923 2912
2924 AllowDeferredHandleDereference vector_structure_check; 2913 AllowDeferredHandleDereference vector_structure_check;
2925 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); 2914 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
(...skipping 15 matching lines...) Expand all
2941 if (FLAG_vector_ics) { 2930 if (FLAG_vector_ics) {
2942 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2931 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2943 } 2932 }
2944 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2933 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL;
2945 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, 2934 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode,
2946 PREMONOMORPHIC).code(); 2935 PREMONOMORPHIC).code();
2947 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2936 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2948 } 2937 }
2949 2938
2950 2939
2951 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) {
2952 Register value = ToRegister(instr->value());
2953 Register cell = scratch0();
2954
2955 // Load the cell.
2956 __ li(cell, Operand(instr->hydrogen()->cell().handle()));
2957
2958 // If the cell we are storing to contains the hole it could have
2959 // been deleted from the property dictionary. In that case, we need
2960 // to update the property details in the property dictionary to mark
2961 // it as no longer deleted.
2962 if (instr->hydrogen()->RequiresHoleCheck()) {
2963 // We use a temp to check the payload.
2964 Register payload = ToRegister(instr->temp());
2965 __ lw(payload, FieldMemOperand(cell, Cell::kValueOffset));
2966 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2967 DeoptimizeIf(eq, instr, Deoptimizer::kHole, payload, Operand(at));
2968 }
2969
2970 // Store the value.
2971 __ sw(value, FieldMemOperand(cell, Cell::kValueOffset));
2972 // Cells are always rescanned, so no write barrier here.
2973 }
2974
2975
2976
2977 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2940 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2978 Register context = ToRegister(instr->context()); 2941 Register context = ToRegister(instr->context());
2979 Register result = ToRegister(instr->result()); 2942 Register result = ToRegister(instr->result());
2980 2943
2981 __ lw(result, ContextOperand(context, instr->slot_index())); 2944 __ lw(result, ContextOperand(context, instr->slot_index()));
2982 if (instr->hydrogen()->RequiresHoleCheck()) { 2945 if (instr->hydrogen()->RequiresHoleCheck()) {
2983 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 2946 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2984 2947
2985 if (instr->hydrogen()->DeoptimizesOnHole()) { 2948 if (instr->hydrogen()->DeoptimizesOnHole()) {
2986 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(at)); 2949 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(at));
(...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after
6017 __ li(at, scope_info); 5980 __ li(at, scope_info);
6018 __ Push(at, ToRegister(instr->function())); 5981 __ Push(at, ToRegister(instr->function()));
6019 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5982 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6020 RecordSafepoint(Safepoint::kNoLazyDeopt); 5983 RecordSafepoint(Safepoint::kNoLazyDeopt);
6021 } 5984 }
6022 5985
6023 5986
6024 #undef __ 5987 #undef __
6025 5988
6026 } } // namespace v8::internal 5989 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698