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

Side by Side Diff: src/compiler/js-operator.cc

Issue 2609013002: [turbofan] Use InternalizedString feedback abstract/strict equality comparisons. (Closed)
Patch Set: Created 3 years, 11 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/compiler/effect-control-linearizer.cc ('k') | src/compiler/js-typed-lowering.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/js-operator.h" 5 #include "src/compiler/js-operator.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/lazy-instance.h" 9 #include "src/base/lazy-instance.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 IrOpcode::kJS##Name, properties, "JS" #Name, 2, 1, 1, 1, 1, \ 578 IrOpcode::kJS##Name, properties, "JS" #Name, 2, 1, 1, 1, 1, \
579 Operator::ZeroIfNoThrow(properties), kHint) {} \ 579 Operator::ZeroIfNoThrow(properties), kHint) {} \
580 }; \ 580 }; \
581 Name##Operator<CompareOperationHint::kNone> k##Name##NoneOperator; \ 581 Name##Operator<CompareOperationHint::kNone> k##Name##NoneOperator; \
582 Name##Operator<CompareOperationHint::kSignedSmall> \ 582 Name##Operator<CompareOperationHint::kSignedSmall> \
583 k##Name##SignedSmallOperator; \ 583 k##Name##SignedSmallOperator; \
584 Name##Operator<CompareOperationHint::kNumber> k##Name##NumberOperator; \ 584 Name##Operator<CompareOperationHint::kNumber> k##Name##NumberOperator; \
585 Name##Operator<CompareOperationHint::kNumberOrOddball> \ 585 Name##Operator<CompareOperationHint::kNumberOrOddball> \
586 k##Name##NumberOrOddballOperator; \ 586 k##Name##NumberOrOddballOperator; \
587 Name##Operator<CompareOperationHint::kString> k##Name##StringOperator; \ 587 Name##Operator<CompareOperationHint::kString> k##Name##StringOperator; \
588 Name##Operator<CompareOperationHint::kInternalizedString> \
589 k##Name##InternalizedStringOperator; \
588 Name##Operator<CompareOperationHint::kAny> k##Name##AnyOperator; 590 Name##Operator<CompareOperationHint::kAny> k##Name##AnyOperator;
589 COMPARE_OP_LIST(COMPARE_OP) 591 COMPARE_OP_LIST(COMPARE_OP)
590 #undef COMPARE_OP 592 #undef COMPARE_OP
591 }; 593 };
592 594
593 static base::LazyInstance<JSOperatorGlobalCache>::type kCache = 595 static base::LazyInstance<JSOperatorGlobalCache>::type kCache =
594 LAZY_INSTANCE_INITIALIZER; 596 LAZY_INSTANCE_INITIALIZER;
595 597
596 JSOperatorBuilder::JSOperatorBuilder(Zone* zone) 598 JSOperatorBuilder::JSOperatorBuilder(Zone* zone)
597 : cache_(kCache.Get()), zone_(zone) {} 599 : cache_(kCache.Get()), zone_(zone) {}
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 const Operator* JSOperatorBuilder::Name(CompareOperationHint hint) { \ 631 const Operator* JSOperatorBuilder::Name(CompareOperationHint hint) { \
630 switch (hint) { \ 632 switch (hint) { \
631 case CompareOperationHint::kNone: \ 633 case CompareOperationHint::kNone: \
632 return &cache_.k##Name##NoneOperator; \ 634 return &cache_.k##Name##NoneOperator; \
633 case CompareOperationHint::kSignedSmall: \ 635 case CompareOperationHint::kSignedSmall: \
634 return &cache_.k##Name##SignedSmallOperator; \ 636 return &cache_.k##Name##SignedSmallOperator; \
635 case CompareOperationHint::kNumber: \ 637 case CompareOperationHint::kNumber: \
636 return &cache_.k##Name##NumberOperator; \ 638 return &cache_.k##Name##NumberOperator; \
637 case CompareOperationHint::kNumberOrOddball: \ 639 case CompareOperationHint::kNumberOrOddball: \
638 return &cache_.k##Name##NumberOrOddballOperator; \ 640 return &cache_.k##Name##NumberOrOddballOperator; \
641 case CompareOperationHint::kInternalizedString: \
642 return &cache_.k##Name##InternalizedStringOperator; \
639 case CompareOperationHint::kString: \ 643 case CompareOperationHint::kString: \
640 return &cache_.k##Name##StringOperator; \ 644 return &cache_.k##Name##StringOperator; \
641 case CompareOperationHint::kAny: \ 645 case CompareOperationHint::kAny: \
642 return &cache_.k##Name##AnyOperator; \ 646 return &cache_.k##Name##AnyOperator; \
643 } \ 647 } \
644 UNREACHABLE(); \ 648 UNREACHABLE(); \
645 return nullptr; \ 649 return nullptr; \
646 } 650 }
647 COMPARE_OP_LIST(COMPARE_OP) 651 COMPARE_OP_LIST(COMPARE_OP)
648 #undef COMPARE_OP 652 #undef COMPARE_OP
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- 968 return new (zone()) Operator1<Handle<ScopeInfo>>( // --
965 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode 969 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
966 "JSCreateScriptContext", // name 970 "JSCreateScriptContext", // name
967 1, 1, 1, 1, 1, 2, // counts 971 1, 1, 1, 1, 1, 2, // counts
968 scope_info); // parameter 972 scope_info); // parameter
969 } 973 }
970 974
971 } // namespace compiler 975 } // namespace compiler
972 } // namespace internal 976 } // namespace internal
973 } // namespace v8 977 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698