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

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

Issue 1312693004: Vector ICs: Ensure KeyedAccessStore mode is encoded in all handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: A few nits. Created 5 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
« no previous file with comments | « src/code-stubs.h ('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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 enum KeyedStoreIncrementLength { kDontIncrementLength, kIncrementLength }; 518 enum KeyedStoreIncrementLength { kDontIncrementLength, kIncrementLength };
519 519
520 520
521 class KeyedStoreIC : public StoreIC { 521 class KeyedStoreIC : public StoreIC {
522 public: 522 public:
523 // ExtraICState bits (building on IC) 523 // ExtraICState bits (building on IC)
524 // ExtraICState bits 524 // ExtraICState bits
525 // When more language modes are added, these BitFields need to move too. 525 // When more language modes are added, these BitFields need to move too.
526 STATIC_ASSERT(i::LANGUAGE_END == 3); 526 STATIC_ASSERT(i::LANGUAGE_END == 3);
527 class ExtraICStateKeyedAccessStoreMode 527 class ExtraICStateKeyedAccessStoreMode
528 : public BitField<KeyedAccessStoreMode, 3, 4> {}; // NOLINT 528 : public BitField<KeyedAccessStoreMode, 3, 3> {}; // NOLINT
529 529
530 class IcCheckTypeField : public BitField<IcCheckType, 7, 1> {}; 530 class IcCheckTypeField : public BitField<IcCheckType, 6, 1> {};
531 531
532 static ExtraICState ComputeExtraICState(LanguageMode flag, 532 static ExtraICState ComputeExtraICState(LanguageMode flag,
533 KeyedAccessStoreMode mode) { 533 KeyedAccessStoreMode mode) {
534 return StoreICState(flag).GetExtraICState() | 534 return StoreICState(flag).GetExtraICState() |
535 ExtraICStateKeyedAccessStoreMode::encode(mode) | 535 ExtraICStateKeyedAccessStoreMode::encode(mode) |
536 IcCheckTypeField::encode(ELEMENT); 536 IcCheckTypeField::encode(ELEMENT);
537 } 537 }
538 538
539 static KeyedAccessStoreMode GetKeyedAccessStoreMode( 539 static KeyedAccessStoreMode GetKeyedAccessStoreMode(
540 ExtraICState extra_state) { 540 ExtraICState extra_state) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 592
593 private: 593 private:
594 inline void set_target(Code* code); 594 inline void set_target(Code* code);
595 595
596 static void Clear(Isolate* isolate, Address address, Code* target, 596 static void Clear(Isolate* isolate, Address address, Code* target,
597 Address constant_pool); 597 Address constant_pool);
598 598
599 Handle<Map> ComputeTransitionedMap(Handle<Map> map, 599 Handle<Map> ComputeTransitionedMap(Handle<Map> map,
600 KeyedAccessStoreMode store_mode); 600 KeyedAccessStoreMode store_mode);
601 601
602 void ValidateStoreMode(Handle<Code> stub);
603
602 friend class IC; 604 friend class IC;
603 }; 605 };
604 606
605 607
606 // Type Recording BinaryOpIC, that records the types of the inputs and outputs. 608 // Type Recording BinaryOpIC, that records the types of the inputs and outputs.
607 class BinaryOpIC : public IC { 609 class BinaryOpIC : public IC {
608 public: 610 public:
609 explicit BinaryOpIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {} 611 explicit BinaryOpIC(Isolate* isolate) : IC(EXTRA_CALL_FRAME, isolate) {}
610 612
611 static Builtins::JavaScript TokenToJSBuiltin(Token::Value op, 613 static Builtins::JavaScript TokenToJSBuiltin(Token::Value op,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 676
675 677
676 // Helper for BinaryOpIC and CompareIC. 678 // Helper for BinaryOpIC and CompareIC.
677 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; 679 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK };
678 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); 680 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check);
679 681
680 } 682 }
681 } // namespace v8::internal 683 } // namespace v8::internal
682 684
683 #endif // V8_IC_H_ 685 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698