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/ic/ic.h

Issue 592113002: Fix method dispatch in Keyed/StoreIC, and JumpIfNotUniqueName usage (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.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 10
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 Handle<Code> slow_stub() const { 365 Handle<Code> slow_stub() const {
366 if (kind() == Code::LOAD_IC) { 366 if (kind() == Code::LOAD_IC) {
367 return isolate()->builtins()->LoadIC_Slow(); 367 return isolate()->builtins()->LoadIC_Slow();
368 } else { 368 } else {
369 DCHECK_EQ(Code::KEYED_LOAD_IC, kind()); 369 DCHECK_EQ(Code::KEYED_LOAD_IC, kind());
370 return isolate()->builtins()->KeyedLoadIC_Slow(); 370 return isolate()->builtins()->KeyedLoadIC_Slow();
371 } 371 }
372 } 372 }
373 373
374 virtual Handle<Code> megamorphic_stub(); 374 virtual Handle<Code> megamorphic_stub() OVERRIDE;
375 375
376 // Update the inline cache and the global stub cache based on the 376 // Update the inline cache and the global stub cache based on the
377 // lookup result. 377 // lookup result.
378 void UpdateCaches(LookupIterator* lookup); 378 void UpdateCaches(LookupIterator* lookup);
379 379
380 virtual Handle<Code> CompileHandler(LookupIterator* lookup, 380 virtual Handle<Code> CompileHandler(LookupIterator* lookup,
381 Handle<Object> unused, 381 Handle<Object> unused,
382 CacheHolderFlag cache_holder); 382 CacheHolderFlag cache_holder);
383 383
384 private: 384 private:
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 486
487 MUST_USE_RESULT MaybeHandle<Object> Store( 487 MUST_USE_RESULT MaybeHandle<Object> Store(
488 Handle<Object> object, Handle<Name> name, Handle<Object> value, 488 Handle<Object> object, Handle<Name> name, Handle<Object> value,
489 JSReceiver::StoreFromKeyed store_mode = 489 JSReceiver::StoreFromKeyed store_mode =
490 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); 490 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED);
491 491
492 bool LookupForWrite(LookupIterator* it, Handle<Object> value, 492 bool LookupForWrite(LookupIterator* it, Handle<Object> value,
493 JSReceiver::StoreFromKeyed store_mode); 493 JSReceiver::StoreFromKeyed store_mode);
494 494
495 protected: 495 protected:
496 virtual Handle<Code> megamorphic_stub(); 496 virtual Handle<Code> megamorphic_stub() OVERRIDE;
497 497
498 // Stub accessors. 498 // Stub accessors.
499 virtual Handle<Code> generic_stub() const; 499 Handle<Code> generic_stub() const;
500 500
501 virtual Handle<Code> slow_stub() const { 501 Handle<Code> slow_stub() const;
502 return isolate()->builtins()->StoreIC_Slow();
503 }
504 502
505 virtual Handle<Code> pre_monomorphic_stub() const { 503 virtual Handle<Code> pre_monomorphic_stub() const {
506 return pre_monomorphic_stub(isolate(), strict_mode()); 504 return pre_monomorphic_stub(isolate(), strict_mode());
507 } 505 }
508 506
509 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, 507 static Handle<Code> pre_monomorphic_stub(Isolate* isolate,
510 StrictMode strict_mode); 508 StrictMode strict_mode);
511 509
512 // Update the inline cache and the global stub cache based on the 510 // Update the inline cache and the global stub cache based on the
513 // lookup result. 511 // lookup result.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 return pre_monomorphic_stub(isolate(), strict_mode()); 572 return pre_monomorphic_stub(isolate(), strict_mode());
575 } 573 }
576 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, 574 static Handle<Code> pre_monomorphic_stub(Isolate* isolate,
577 StrictMode strict_mode) { 575 StrictMode strict_mode) {
578 if (strict_mode == STRICT) { 576 if (strict_mode == STRICT) {
579 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict(); 577 return isolate->builtins()->KeyedStoreIC_PreMonomorphic_Strict();
580 } else { 578 } else {
581 return isolate->builtins()->KeyedStoreIC_PreMonomorphic(); 579 return isolate->builtins()->KeyedStoreIC_PreMonomorphic();
582 } 580 }
583 } 581 }
584 virtual Handle<Code> slow_stub() const {
585 return isolate()->builtins()->KeyedStoreIC_Slow();
586 }
587 virtual Handle<Code> megamorphic_stub() {
588 if (strict_mode() == STRICT) {
589 return isolate()->builtins()->KeyedStoreIC_Generic_Strict();
590 } else {
591 return isolate()->builtins()->KeyedStoreIC_Generic();
592 }
593 }
594 582
595 Handle<Code> StoreElementStub(Handle<JSObject> receiver, 583 Handle<Code> StoreElementStub(Handle<JSObject> receiver,
596 KeyedAccessStoreMode store_mode); 584 KeyedAccessStoreMode store_mode);
597 585
598 private: 586 private:
599 inline void set_target(Code* code); 587 inline void set_target(Code* code);
600 588
601 // Stub accessors. 589 // Stub accessors.
602 virtual Handle<Code> generic_stub() const {
603 if (strict_mode() == STRICT) {
604 return isolate()->builtins()->KeyedStoreIC_Generic_Strict();
605 } else {
606 return isolate()->builtins()->KeyedStoreIC_Generic();
607 }
608 }
609
610 Handle<Code> sloppy_arguments_stub() { 590 Handle<Code> sloppy_arguments_stub() {
611 return isolate()->builtins()->KeyedStoreIC_SloppyArguments(); 591 return isolate()->builtins()->KeyedStoreIC_SloppyArguments();
612 } 592 }
613 593
614 static void Clear(Isolate* isolate, Address address, Code* target, 594 static void Clear(Isolate* isolate, Address address, Code* target,
615 ConstantPoolArray* constant_pool); 595 ConstantPoolArray* constant_pool);
616 596
617 KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver, 597 KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver,
618 Handle<Object> key, Handle<Object> value); 598 Handle<Object> key, Handle<Object> value);
619 599
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 693
714 // Support functions for interceptor handlers. 694 // Support functions for interceptor handlers.
715 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); 695 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
716 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); 696 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor);
717 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); 697 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor);
718 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); 698 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor);
719 } 699 }
720 } // namespace v8::internal 700 } // namespace v8::internal
721 701
722 #endif // V8_IC_H_ 702 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698