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

Side by Side Diff: src/ia32/code-stubs-ia32.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/flag-definitions.h ('k') | src/ia32/interface-descriptors-ia32.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 5100 matching lines...) Expand 10 before | Expand all | Expand 10 after
5111 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); 5111 __ mov(edx, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
5112 __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset)); 5112 __ Push(Operand(edx, StandardFrameConstants::kFunctionOffset));
5113 } else { 5113 } else {
5114 __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset)); 5114 __ Push(Operand(ebp, StandardFrameConstants::kFunctionOffset));
5115 } 5115 }
5116 __ PushReturnAddressFrom(ecx); 5116 __ PushReturnAddressFrom(ecx);
5117 __ TailCallRuntime(Runtime::kNewStrictArguments); 5117 __ TailCallRuntime(Runtime::kNewStrictArguments);
5118 } 5118 }
5119 5119
5120 5120
5121 void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) {
5122 Register context_reg = esi;
5123 Register slot_reg = ebx;
5124 Register result_reg = eax;
5125 Label slow_case;
5126
5127 // Go up context chain to the script context.
5128 for (int i = 0; i < depth(); ++i) {
5129 __ mov(result_reg, ContextOperand(context_reg, Context::PREVIOUS_INDEX));
5130 context_reg = result_reg;
5131 }
5132
5133 // Load the PropertyCell value at the specified slot.
5134 __ mov(result_reg, ContextOperand(context_reg, slot_reg));
5135 __ mov(result_reg, FieldOperand(result_reg, PropertyCell::kValueOffset));
5136
5137 // Check that value is not the_hole.
5138 __ CompareRoot(result_reg, Heap::kTheHoleValueRootIndex);
5139 __ j(equal, &slow_case, Label::kNear);
5140 __ Ret();
5141
5142 // Fallback to the runtime.
5143 __ bind(&slow_case);
5144 __ SmiTag(slot_reg);
5145 __ Pop(result_reg); // Pop return address.
5146 __ Push(slot_reg);
5147 __ Push(result_reg); // Push return address.
5148 __ TailCallRuntime(Runtime::kLoadGlobalViaContext);
5149 }
5150
5151
5152 void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { 5121 void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
5153 Register context_reg = esi; 5122 Register context_reg = esi;
5154 Register slot_reg = ebx; 5123 Register slot_reg = ebx;
5155 Register value_reg = eax; 5124 Register value_reg = eax;
5156 Register cell_reg = edi; 5125 Register cell_reg = edi;
5157 Register cell_details_reg = edx; 5126 Register cell_details_reg = edx;
5158 Register cell_value_reg = ecx; 5127 Register cell_value_reg = ecx;
5159 Label fast_heapobject_case, fast_smi_case, slow_case; 5128 Label fast_heapobject_case, fast_smi_case, slow_case;
5160 5129
5161 if (FLAG_debug_code) { 5130 if (FLAG_debug_code) {
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
5649 kStackUnwindSpace, nullptr, return_value_operand, 5618 kStackUnwindSpace, nullptr, return_value_operand,
5650 NULL); 5619 NULL);
5651 } 5620 }
5652 5621
5653 #undef __ 5622 #undef __
5654 5623
5655 } // namespace internal 5624 } // namespace internal
5656 } // namespace v8 5625 } // namespace v8
5657 5626
5658 #endif // V8_TARGET_ARCH_IA32 5627 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698