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

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

Issue 755513003: Hydrogen: fix keyed loads with string keys (Closed) Base URL: gh:v8/v8@master
Patch Set: rebase again Created 6 years 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
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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 static void Clear(Isolate* isolate, Address address, Code* target, 453 static void Clear(Isolate* isolate, Address address, Code* target,
454 ConstantPoolArray* constant_pool); 454 ConstantPoolArray* constant_pool);
455 455
456 friend class IC; 456 friend class IC;
457 }; 457 };
458 458
459 459
460 class KeyedLoadIC : public LoadIC { 460 class KeyedLoadIC : public LoadIC {
461 public: 461 public:
462 // ExtraICState bits (building on IC)
463 class IcCheckTypeField : public BitField<IcCheckType, 1, 1> {};
464
465 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode,
466 IcCheckType key_type) {
467 return LoadICState(contextual_mode).GetExtraICState() |
468 IcCheckTypeField::encode(key_type);
469 }
470
471 static IcCheckType GetKeyType(ExtraICState extra_state) {
472 return IcCheckTypeField::decode(extra_state);
473 }
474
462 KeyedLoadIC(FrameDepth depth, Isolate* isolate, 475 KeyedLoadIC(FrameDepth depth, Isolate* isolate,
463 KeyedLoadICNexus* nexus = NULL) 476 KeyedLoadICNexus* nexus = NULL)
464 : LoadIC(depth, isolate, nexus) { 477 : LoadIC(depth, isolate, nexus) {
465 DCHECK(!FLAG_vector_ics || nexus != NULL); 478 DCHECK(!FLAG_vector_ics || nexus != NULL);
466 DCHECK(target()->is_keyed_load_stub()); 479 DCHECK(target()->is_keyed_load_stub());
467 } 480 }
468 481
469 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, 482 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object,
470 Handle<Object> key); 483 Handle<Object> key);
471 484
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 774
762 // Support functions for interceptor handlers. 775 // Support functions for interceptor handlers.
763 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); 776 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly);
764 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); 777 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor);
765 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); 778 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor);
766 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); 779 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor);
767 } 780 }
768 } // namespace v8::internal 781 } // namespace v8::internal
769 782
770 #endif // V8_IC_H_ 783 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic/ic-compiler.cc » ('j') | src/typing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698