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

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 50863002: Use register allocator for context on x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added comment to test case Created 7 years, 1 month 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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 inputs_[0] = value; 733 inputs_[0] = value;
734 } 734 }
735 735
736 LOperand* value() { return inputs_[0]; } 736 LOperand* value() { return inputs_[0]; }
737 737
738 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor") 738 DECLARE_CONCRETE_INSTRUCTION(MathFloor, "math-floor")
739 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 739 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
740 }; 740 };
741 741
742 742
743 class LMathRound V8_FINAL : public LTemplateInstruction<1, 2, 1> { 743 class LMathRound V8_FINAL : public LTemplateInstruction<1, 1, 1> {
744 public: 744 public:
745 LMathRound(LOperand* context, LOperand* value, LOperand* temp) { 745 LMathRound(LOperand* value, LOperand* temp) {
746 inputs_[1] = context;
747 inputs_[0] = value; 746 inputs_[0] = value;
748 temps_[0] = temp; 747 temps_[0] = temp;
749 } 748 }
750 749
751 LOperand* context() { return inputs_[1]; }
752 LOperand* value() { return inputs_[0]; } 750 LOperand* value() { return inputs_[0]; }
753 LOperand* temp() { return temps_[0]; } 751 LOperand* temp() { return temps_[0]; }
754 752
755 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round") 753 DECLARE_CONCRETE_INSTRUCTION(MathRound, "math-round")
756 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation) 754 DECLARE_HYDROGEN_ACCESSOR(UnaryMathOperation)
757 }; 755 };
758 756
759 757
760 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> { 758 class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> {
761 public: 759 public:
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 explicit LMathSqrt(LOperand* value) { 842 explicit LMathSqrt(LOperand* value) {
845 inputs_[0] = value; 843 inputs_[0] = value;
846 } 844 }
847 845
848 LOperand* value() { return inputs_[0]; } 846 LOperand* value() { return inputs_[0]; }
849 847
850 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt") 848 DECLARE_CONCRETE_INSTRUCTION(MathSqrt, "math-sqrt")
851 }; 849 };
852 850
853 851
854 class LMathPowHalf V8_FINAL : public LTemplateInstruction<1, 2, 1> { 852 class LMathPowHalf V8_FINAL : public LTemplateInstruction<1, 1, 1> {
855 public: 853 public:
856 LMathPowHalf(LOperand* context, LOperand* value, LOperand* temp) { 854 LMathPowHalf(LOperand* value, LOperand* temp) {
857 inputs_[1] = context;
858 inputs_[0] = value; 855 inputs_[0] = value;
859 temps_[0] = temp; 856 temps_[0] = temp;
860 } 857 }
861 858
862 LOperand* context() { return inputs_[1]; }
863 LOperand* value() { return inputs_[0]; } 859 LOperand* value() { return inputs_[0]; }
864 LOperand* temp() { return temps_[0]; } 860 LOperand* temp() { return temps_[0]; }
865 861
866 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half") 862 DECLARE_CONCRETE_INSTRUCTION(MathPowHalf, "math-pow-half")
867 }; 863 };
868 864
869 865
870 class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> { 866 class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> {
871 public: 867 public:
872 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { 868 LCmpObjectEqAndBranch(LOperand* left, LOperand* right) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 957
962 958
963 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> { 959 class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> {
964 public: 960 public:
965 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { 961 LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) {
966 inputs_[0] = context; 962 inputs_[0] = context;
967 inputs_[1] = left; 963 inputs_[1] = left;
968 inputs_[2] = right; 964 inputs_[2] = right;
969 } 965 }
970 966
967 LOperand* context() { return inputs_[1]; }
971 LOperand* left() { return inputs_[1]; } 968 LOperand* left() { return inputs_[1]; }
972 LOperand* right() { return inputs_[2]; } 969 LOperand* right() { return inputs_[2]; }
973 970
974 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 971 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
975 "string-compare-and-branch") 972 "string-compare-and-branch")
976 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 973 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
977 974
978 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 975 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
979 976
980 Token::Value op() const { return hydrogen()->token(); } 977 Token::Value op() const { return hydrogen()->token(); }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 public: 1062 public:
1066 LCmpT(LOperand* context, LOperand* left, LOperand* right) { 1063 LCmpT(LOperand* context, LOperand* left, LOperand* right) {
1067 inputs_[0] = context; 1064 inputs_[0] = context;
1068 inputs_[1] = left; 1065 inputs_[1] = left;
1069 inputs_[2] = right; 1066 inputs_[2] = right;
1070 } 1067 }
1071 1068
1072 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t") 1069 DECLARE_CONCRETE_INSTRUCTION(CmpT, "cmp-t")
1073 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric) 1070 DECLARE_HYDROGEN_ACCESSOR(CompareGeneric)
1074 1071
1072 LOperand* context() { return inputs_[0]; }
1075 Token::Value op() const { return hydrogen()->token(); } 1073 Token::Value op() const { return hydrogen()->token(); }
1076 }; 1074 };
1077 1075
1078 1076
1079 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> { 1077 class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1080 public: 1078 public:
1081 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { 1079 LInstanceOf(LOperand* context, LOperand* left, LOperand* right) {
1082 inputs_[0] = context; 1080 inputs_[0] = context;
1083 inputs_[1] = left; 1081 inputs_[1] = left;
1084 inputs_[2] = right; 1082 inputs_[2] = right;
1085 } 1083 }
1086 1084
1087 LOperand* context() { return inputs_[0]; } 1085 LOperand* context() { return inputs_[0]; }
1088 1086
1089 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 1087 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
1090 }; 1088 };
1091 1089
1092 1090
1093 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> { 1091 class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> {
1094 public: 1092 public:
1095 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { 1093 LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) {
1096 inputs_[0] = context; 1094 inputs_[0] = context;
1097 inputs_[1] = value; 1095 inputs_[1] = value;
1098 temps_[0] = temp; 1096 temps_[0] = temp;
1099 } 1097 }
1100 1098
1099 LOperand* context() { return inputs_[0]; }
1101 LOperand* value() { return inputs_[1]; } 1100 LOperand* value() { return inputs_[1]; }
1102 LOperand* temp() { return temps_[0]; } 1101 LOperand* temp() { return temps_[0]; }
1103 1102
1104 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal, 1103 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
1105 "instance-of-known-global") 1104 "instance-of-known-global")
1106 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal) 1105 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
1107 1106
1108 Handle<JSFunction> function() const { return hydrogen()->function(); } 1107 Handle<JSFunction> function() const { return hydrogen()->function(); }
1109 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { 1108 LEnvironment* GetDeferredLazyDeoptimizationEnvironment() {
1110 return lazy_deopt_env_; 1109 return lazy_deopt_env_;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 1493
1495 Token::Value op() const { return op_; } 1494 Token::Value op() const { return op_; }
1496 1495
1497 private: 1496 private:
1498 Token::Value op_; 1497 Token::Value op_;
1499 }; 1498 };
1500 1499
1501 1500
1502 class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> { 1501 class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> {
1503 public: 1502 public:
1504 explicit LReturn(LOperand* value, LOperand* context, 1503 explicit LReturn(LOperand* value,
1504 LOperand* context,
1505 LOperand* parameter_count) { 1505 LOperand* parameter_count) {
1506 inputs_[0] = value; 1506 inputs_[0] = value;
1507 inputs_[1] = context; 1507 inputs_[1] = context;
1508 inputs_[2] = parameter_count; 1508 inputs_[2] = parameter_count;
1509 } 1509 }
1510 1510
1511 bool has_constant_parameter_count() { 1511 bool has_constant_parameter_count() {
1512 return parameter_count()->IsConstantOperand(); 1512 return parameter_count()->IsConstantOperand();
1513 } 1513 }
1514 LConstantOperand* constant_parameter_count() { 1514 LConstantOperand* constant_parameter_count() {
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
2901 2901
2902 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2902 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2903 }; 2903 };
2904 2904
2905 #undef DECLARE_HYDROGEN_ACCESSOR 2905 #undef DECLARE_HYDROGEN_ACCESSOR
2906 #undef DECLARE_CONCRETE_INSTRUCTION 2906 #undef DECLARE_CONCRETE_INSTRUCTION
2907 2907
2908 } } // namespace v8::internal 2908 } } // namespace v8::internal
2909 2909
2910 #endif // V8_IA32_LITHIUM_IA32_H_ 2910 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698