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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 2065113002: [ic] LoadGlobalIC caches PropertyCells in the feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 6 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/interface-descriptors.cc ('k') | src/mips/interface-descriptors-mips.cc » ('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 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 5080 matching lines...) Expand 10 before | Expand all | Expand 10 after
5091 } 5091 }
5092 __ jmp(&done_allocate); 5092 __ jmp(&done_allocate);
5093 5093
5094 // Fall back to %NewStrictArguments. 5094 // Fall back to %NewStrictArguments.
5095 __ bind(&too_big_for_new_space); 5095 __ bind(&too_big_for_new_space);
5096 __ Push(a1); 5096 __ Push(a1);
5097 __ TailCallRuntime(Runtime::kNewStrictArguments); 5097 __ TailCallRuntime(Runtime::kNewStrictArguments);
5098 } 5098 }
5099 5099
5100 5100
5101 void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
5102 Register context_reg = cp;
5103 Register slot_reg = a2;
5104 Register result_reg = v0;
5105 Label slow_case;
5106
5107 // Go up context chain to the script context.
5108 for (int i = 0; i < depth(); ++i) {
5109 __ lw(result_reg, ContextMemOperand(context_reg, Context::PREVIOUS_INDEX));
5110 context_reg = result_reg;
5111 }
5112
5113 // Load the PropertyCell value at the specified slot.
5114 __ Lsa(at, context_reg, slot_reg, kPointerSizeLog2);
5115 __ lw(result_reg, ContextMemOperand(at, 0));
5116 __ lw(result_reg, FieldMemOperand(result_reg, PropertyCell::kValueOffset));
5117
5118 // Check that value is not the_hole.
5119 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
5120 __ Branch(&slow_case, eq, result_reg, Operand(at));
5121 __ Ret();
5122
5123 // Fallback to the runtime.
5124 __ bind(&slow_case);
5125 __ SmiTag(slot_reg);
5126 __ Push(slot_reg);
5127 __ TailCallRuntime(Runtime::kLoadGlobalViaContext);
5128 }
5129
5130
5131 void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { 5101 void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
5132 Register context_reg = cp; 5102 Register context_reg = cp;
5133 Register slot_reg = a2; 5103 Register slot_reg = a2;
5134 Register value_reg = a0; 5104 Register value_reg = a0;
5135 Register cell_reg = t0; 5105 Register cell_reg = t0;
5136 Register cell_value_reg = t1; 5106 Register cell_value_reg = t1;
5137 Register cell_details_reg = t2; 5107 Register cell_details_reg = t2;
5138 Label fast_heapobject_case, fast_smi_case, slow_case; 5108 Label fast_heapobject_case, fast_smi_case, slow_case;
5139 5109
5140 if (FLAG_debug_code) { 5110 if (FLAG_debug_code) {
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
5546 kStackUnwindSpace, kInvalidStackOffset, 5516 kStackUnwindSpace, kInvalidStackOffset,
5547 return_value_operand, NULL); 5517 return_value_operand, NULL);
5548 } 5518 }
5549 5519
5550 #undef __ 5520 #undef __
5551 5521
5552 } // namespace internal 5522 } // namespace internal
5553 } // namespace v8 5523 } // namespace v8
5554 5524
5555 #endif // V8_TARGET_ARCH_MIPS 5525 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/interface-descriptors.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698