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

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

Issue 2529463002: [Turbofan]: generic lowering can use a constant vector (Closed)
Patch Set: Add verifier code. Created 4 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
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/verifier.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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 1, 1, 1, 1, 1, 0, // counts 656 1, 1, 1, 1, 1, 0, // counts
657 convert_mode); // parameter 657 convert_mode); // parameter
658 } 658 }
659 659
660 const Operator* JSOperatorBuilder::LoadNamed(Handle<Name> name, 660 const Operator* JSOperatorBuilder::LoadNamed(Handle<Name> name,
661 const VectorSlotPair& feedback) { 661 const VectorSlotPair& feedback) {
662 NamedAccess access(SLOPPY, name, feedback); 662 NamedAccess access(SLOPPY, name, feedback);
663 return new (zone()) Operator1<NamedAccess>( // -- 663 return new (zone()) Operator1<NamedAccess>( // --
664 IrOpcode::kJSLoadNamed, Operator::kNoProperties, // opcode 664 IrOpcode::kJSLoadNamed, Operator::kNoProperties, // opcode
665 "JSLoadNamed", // name 665 "JSLoadNamed", // name
666 2, 1, 1, 1, 1, 2, // counts 666 1, 1, 1, 1, 1, 2, // counts
667 access); // parameter 667 access); // parameter
668 } 668 }
669 669
670 const Operator* JSOperatorBuilder::LoadProperty( 670 const Operator* JSOperatorBuilder::LoadProperty(
671 VectorSlotPair const& feedback) { 671 VectorSlotPair const& feedback) {
672 PropertyAccess access(SLOPPY, feedback); 672 PropertyAccess access(SLOPPY, feedback);
673 return new (zone()) Operator1<PropertyAccess>( // -- 673 return new (zone()) Operator1<PropertyAccess>( // --
674 IrOpcode::kJSLoadProperty, Operator::kNoProperties, // opcode 674 IrOpcode::kJSLoadProperty, Operator::kNoProperties, // opcode
675 "JSLoadProperty", // name 675 "JSLoadProperty", // name
676 3, 1, 1, 1, 1, 2, // counts 676 2, 1, 1, 1, 1, 2, // counts
677 access); // parameter 677 access); // parameter
678 } 678 }
679 679
680 const Operator* JSOperatorBuilder::GeneratorStore(int register_count) { 680 const Operator* JSOperatorBuilder::GeneratorStore(int register_count) {
681 return new (zone()) Operator1<int>( // -- 681 return new (zone()) Operator1<int>( // --
682 IrOpcode::kJSGeneratorStore, Operator::kNoThrow, // opcode 682 IrOpcode::kJSGeneratorStore, Operator::kNoThrow, // opcode
683 "JSGeneratorStore", // name 683 "JSGeneratorStore", // name
684 3 + register_count, 1, 1, 0, 1, 0, // counts 684 3 + register_count, 1, 1, 0, 1, 0, // counts
685 register_count); // parameter 685 register_count); // parameter
686 } 686 }
687 687
688 const Operator* JSOperatorBuilder::GeneratorRestoreRegister(int index) { 688 const Operator* JSOperatorBuilder::GeneratorRestoreRegister(int index) {
689 return new (zone()) Operator1<int>( // -- 689 return new (zone()) Operator1<int>( // --
690 IrOpcode::kJSGeneratorRestoreRegister, Operator::kNoThrow, // opcode 690 IrOpcode::kJSGeneratorRestoreRegister, Operator::kNoThrow, // opcode
691 "JSGeneratorRestoreRegister", // name 691 "JSGeneratorRestoreRegister", // name
692 1, 1, 1, 1, 1, 0, // counts 692 1, 1, 1, 1, 1, 0, // counts
693 index); // parameter 693 index); // parameter
694 } 694 }
695 695
696 const Operator* JSOperatorBuilder::StoreNamed(LanguageMode language_mode, 696 const Operator* JSOperatorBuilder::StoreNamed(LanguageMode language_mode,
697 Handle<Name> name, 697 Handle<Name> name,
698 VectorSlotPair const& feedback) { 698 VectorSlotPair const& feedback) {
699 NamedAccess access(language_mode, name, feedback); 699 NamedAccess access(language_mode, name, feedback);
700 return new (zone()) Operator1<NamedAccess>( // -- 700 return new (zone()) Operator1<NamedAccess>( // --
701 IrOpcode::kJSStoreNamed, Operator::kNoProperties, // opcode 701 IrOpcode::kJSStoreNamed, Operator::kNoProperties, // opcode
702 "JSStoreNamed", // name 702 "JSStoreNamed", // name
703 3, 1, 1, 0, 1, 2, // counts 703 2, 1, 1, 0, 1, 2, // counts
704 access); // parameter 704 access); // parameter
705 } 705 }
706 706
707 707
708 const Operator* JSOperatorBuilder::StoreProperty( 708 const Operator* JSOperatorBuilder::StoreProperty(
709 LanguageMode language_mode, VectorSlotPair const& feedback) { 709 LanguageMode language_mode, VectorSlotPair const& feedback) {
710 PropertyAccess access(language_mode, feedback); 710 PropertyAccess access(language_mode, feedback);
711 return new (zone()) Operator1<PropertyAccess>( // -- 711 return new (zone()) Operator1<PropertyAccess>( // --
712 IrOpcode::kJSStoreProperty, Operator::kNoProperties, // opcode 712 IrOpcode::kJSStoreProperty, Operator::kNoProperties, // opcode
713 "JSStoreProperty", // name 713 "JSStoreProperty", // name
714 4, 1, 1, 0, 1, 2, // counts 714 3, 1, 1, 0, 1, 2, // counts
715 access); // parameter 715 access); // parameter
716 } 716 }
717 717
718 718
719 const Operator* JSOperatorBuilder::DeleteProperty(LanguageMode language_mode) { 719 const Operator* JSOperatorBuilder::DeleteProperty(LanguageMode language_mode) {
720 return new (zone()) Operator1<LanguageMode>( // -- 720 return new (zone()) Operator1<LanguageMode>( // --
721 IrOpcode::kJSDeleteProperty, Operator::kNoProperties, // opcode 721 IrOpcode::kJSDeleteProperty, Operator::kNoProperties, // opcode
722 "JSDeleteProperty", // name 722 "JSDeleteProperty", // name
723 2, 1, 1, 1, 1, 2, // counts 723 2, 1, 1, 1, 1, 2, // counts
724 language_mode); // parameter 724 language_mode); // parameter
725 } 725 }
726 726
727 727
728 const Operator* JSOperatorBuilder::LoadGlobal(const Handle<Name>& name, 728 const Operator* JSOperatorBuilder::LoadGlobal(const Handle<Name>& name,
729 const VectorSlotPair& feedback, 729 const VectorSlotPair& feedback,
730 TypeofMode typeof_mode) { 730 TypeofMode typeof_mode) {
731 LoadGlobalParameters parameters(name, feedback, typeof_mode); 731 LoadGlobalParameters parameters(name, feedback, typeof_mode);
732 return new (zone()) Operator1<LoadGlobalParameters>( // -- 732 return new (zone()) Operator1<LoadGlobalParameters>( // --
733 IrOpcode::kJSLoadGlobal, Operator::kNoProperties, // opcode 733 IrOpcode::kJSLoadGlobal, Operator::kNoProperties, // opcode
734 "JSLoadGlobal", // name 734 "JSLoadGlobal", // name
735 1, 1, 1, 1, 1, 2, // counts 735 0, 1, 1, 1, 1, 2, // counts
736 parameters); // parameter 736 parameters); // parameter
737 } 737 }
738 738
739 739
740 const Operator* JSOperatorBuilder::StoreGlobal(LanguageMode language_mode, 740 const Operator* JSOperatorBuilder::StoreGlobal(LanguageMode language_mode,
741 const Handle<Name>& name, 741 const Handle<Name>& name,
742 const VectorSlotPair& feedback) { 742 const VectorSlotPair& feedback) {
743 StoreGlobalParameters parameters(language_mode, feedback, name); 743 StoreGlobalParameters parameters(language_mode, feedback, name);
744 return new (zone()) Operator1<StoreGlobalParameters>( // -- 744 return new (zone()) Operator1<StoreGlobalParameters>( // --
745 IrOpcode::kJSStoreGlobal, Operator::kNoProperties, // opcode 745 IrOpcode::kJSStoreGlobal, Operator::kNoProperties, // opcode
746 "JSStoreGlobal", // name 746 "JSStoreGlobal", // name
747 2, 1, 1, 0, 1, 2, // counts 747 1, 1, 1, 0, 1, 2, // counts
748 parameters); // parameter 748 parameters); // parameter
749 } 749 }
750 750
751 751
752 const Operator* JSOperatorBuilder::LoadContext(size_t depth, size_t index, 752 const Operator* JSOperatorBuilder::LoadContext(size_t depth, size_t index,
753 bool immutable) { 753 bool immutable) {
754 ContextAccess access(depth, index, immutable); 754 ContextAccess access(depth, index, immutable);
755 return new (zone()) Operator1<ContextAccess>( // -- 755 return new (zone()) Operator1<ContextAccess>( // --
756 IrOpcode::kJSLoadContext, // opcode 756 IrOpcode::kJSLoadContext, // opcode
757 Operator::kNoWrite | Operator::kNoThrow, // flags 757 Operator::kNoWrite | Operator::kNoThrow, // flags
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- 900 return new (zone()) Operator1<Handle<ScopeInfo>>( // --
901 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode 901 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
902 "JSCreateScriptContext", // name 902 "JSCreateScriptContext", // name
903 1, 1, 1, 1, 1, 2, // counts 903 1, 1, 1, 1, 1, 2, // counts
904 scpope_info); // parameter 904 scpope_info); // parameter
905 } 905 }
906 906
907 } // namespace compiler 907 } // namespace compiler
908 } // namespace internal 908 } // namespace internal
909 } // namespace v8 909 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698