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

Side by Side Diff: src/builtins/builtins-handler.cc

Issue 2677603004: [ic] Fix StoreIC_SlowSloppy/Strict builtins. (Closed)
Patch Set: cleanup Created 3 years, 10 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/builtins/builtins.h ('k') | src/ic/ic.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/builtins/builtins-utils.h" 5 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/code-stub-assembler.h" 7 #include "src/code-stub-assembler.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/ic/keyed-store-generic.h" 10 #include "src/ic/keyed-store-generic.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 Bind(&slow); 206 Bind(&slow);
207 TailCallRuntime(Runtime::kStoreIC_Miss, context, value, slot, vector, 207 TailCallRuntime(Runtime::kStoreIC_Miss, context, value, slot, vector,
208 receiver, name); 208 receiver, name);
209 } 209 }
210 210
211 void Builtins::Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { 211 void Builtins::Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) {
212 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm); 212 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm);
213 } 213 }
214 214
215 namespace {
216 void Generate_StoreIC_Slow(compiler::CodeAssemblerState* state,
217 LanguageMode language_mode) {
218 typedef compiler::Node Node;
219 typedef StoreWithVectorDescriptor Descriptor;
220 CodeStubAssembler assembler(state);
221
222 Node* receiver = assembler.Parameter(Descriptor::kReceiver);
223 Node* name = assembler.Parameter(Descriptor::kName);
224 Node* value = assembler.Parameter(Descriptor::kValue);
225 Node* context = assembler.Parameter(Descriptor::kContext);
226 Node* lang_mode = assembler.SmiConstant(Smi::FromInt(language_mode));
227
228 // The slow case calls into the runtime to complete the store without causing
229 // an IC miss that would otherwise cause a transition to the generic stub.
230 assembler.TailCallRuntime(Runtime::kSetProperty, context, receiver, name,
231 value, lang_mode);
232 }
233 } // anonymous namespace
234
235 void Builtins::Generate_StoreIC_SlowSloppy(
236 compiler::CodeAssemblerState* state) {
237 Generate_StoreIC_Slow(state, SLOPPY);
238 }
239
240 void Builtins::Generate_StoreIC_SlowStrict(
241 compiler::CodeAssemblerState* state) {
242 Generate_StoreIC_Slow(state, STRICT);
243 }
244
245 } // namespace internal 215 } // namespace internal
246 } // namespace v8 216 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins.h ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698