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

Side by Side Diff: src/ic/ic.h

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-handler.cc ('k') | src/ic/ic.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 #ifndef V8_IC_H_ 5 #ifndef V8_IC_H_
6 #define V8_IC_H_ 6 #define V8_IC_H_
7 7
8 #include "src/ic/ic-state.h" 8 #include "src/ic/ic-state.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); 373 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED);
374 374
375 bool LookupForWrite(LookupIterator* it, Handle<Object> value, 375 bool LookupForWrite(LookupIterator* it, Handle<Object> value,
376 JSReceiver::StoreFromKeyed store_mode); 376 JSReceiver::StoreFromKeyed store_mode);
377 377
378 static void Clear(Isolate* isolate, Code* host, StoreICNexus* nexus); 378 static void Clear(Isolate* isolate, Code* host, StoreICNexus* nexus);
379 379
380 protected: 380 protected:
381 // Stub accessors. 381 // Stub accessors.
382 Handle<Code> slow_stub() const { 382 Handle<Code> slow_stub() const {
383 // TODO(ishell): don't hard-code language mode into the handler because 383 // StoreIC and KeyedStoreIC share the same slow stub.
384 // this handler can be re-used through megamorphic stub cache for wrong 384 return isolate()->builtins()->KeyedStoreIC_Slow();
385 // language mode.
386 // The slow stub must decode the language mode from the IC kind.
387 switch (language_mode()) {
388 case SLOPPY:
389 return isolate()->builtins()->StoreIC_SlowSloppy();
390 case STRICT:
391 return isolate()->builtins()->StoreIC_SlowStrict();
392 default:
393 UNREACHABLE();
394 return Handle<Code>();
395 }
396 } 385 }
397 386
398 // Update the inline cache and the global stub cache based on the 387 // Update the inline cache and the global stub cache based on the
399 // lookup result. 388 // lookup result.
400 void UpdateCaches(LookupIterator* lookup, Handle<Object> value, 389 void UpdateCaches(LookupIterator* lookup, Handle<Object> value,
401 JSReceiver::StoreFromKeyed store_mode); 390 JSReceiver::StoreFromKeyed store_mode);
402 Handle<Object> GetMapIndependentHandler(LookupIterator* lookup) override; 391 Handle<Object> GetMapIndependentHandler(LookupIterator* lookup) override;
403 Handle<Object> CompileHandler(LookupIterator* lookup, Handle<Object> value, 392 Handle<Object> CompileHandler(LookupIterator* lookup, Handle<Object> value,
404 CacheHolderFlag cache_holder) override; 393 CacheHolderFlag cache_holder) override;
405 394
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 484
496 // Helper for BinaryOpIC and CompareIC. 485 // Helper for BinaryOpIC and CompareIC.
497 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 486 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
498 void PatchInlinedSmiCode(Isolate* isolate, Address address, 487 void PatchInlinedSmiCode(Isolate* isolate, Address address,
499 InlinedSmiCheck check); 488 InlinedSmiCheck check);
500 489
501 } // namespace internal 490 } // namespace internal
502 } // namespace v8 491 } // namespace v8
503 492
504 #endif // V8_IC_H_ 493 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-handler.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698