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

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

Issue 9110008: Inline Math.max and Math.min in crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 V(LoadFunctionPrototype) \ 116 V(LoadFunctionPrototype) \
117 V(LoadGlobalCell) \ 117 V(LoadGlobalCell) \
118 V(LoadGlobalGeneric) \ 118 V(LoadGlobalGeneric) \
119 V(LoadKeyedFastElement) \ 119 V(LoadKeyedFastElement) \
120 V(LoadKeyedFastDoubleElement) \ 120 V(LoadKeyedFastDoubleElement) \
121 V(LoadKeyedGeneric) \ 121 V(LoadKeyedGeneric) \
122 V(LoadKeyedSpecializedArrayElement) \ 122 V(LoadKeyedSpecializedArrayElement) \
123 V(LoadNamedField) \ 123 V(LoadNamedField) \
124 V(LoadNamedFieldPolymorphic) \ 124 V(LoadNamedFieldPolymorphic) \
125 V(LoadNamedGeneric) \ 125 V(LoadNamedGeneric) \
126 V(MathMinMax) \
126 V(MathPowHalf) \ 127 V(MathPowHalf) \
127 V(ModI) \ 128 V(ModI) \
128 V(MulI) \ 129 V(MulI) \
129 V(NumberTagD) \ 130 V(NumberTagD) \
130 V(NumberTagI) \ 131 V(NumberTagI) \
131 V(NumberUntagD) \ 132 V(NumberUntagD) \
132 V(ObjectLiteralFast) \ 133 V(ObjectLiteralFast) \
133 V(ObjectLiteralGeneric) \ 134 V(ObjectLiteralGeneric) \
134 V(OsrEntry) \ 135 V(OsrEntry) \
135 V(OuterContext) \ 136 V(OuterContext) \
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 LPower(LOperand* left, LOperand* right) { 1037 LPower(LOperand* left, LOperand* right) {
1037 inputs_[0] = left; 1038 inputs_[0] = left;
1038 inputs_[1] = right; 1039 inputs_[1] = right;
1039 } 1040 }
1040 1041
1041 DECLARE_CONCRETE_INSTRUCTION(Power, "power") 1042 DECLARE_CONCRETE_INSTRUCTION(Power, "power")
1042 DECLARE_HYDROGEN_ACCESSOR(Power) 1043 DECLARE_HYDROGEN_ACCESSOR(Power)
1043 }; 1044 };
1044 1045
1045 1046
1047 class LMathMinMax: public LTemplateInstruction<1, 2, 3> {
1048 public:
1049 LMathMinMax(LOperand* left,
1050 LOperand* right,
1051 LOperand* temp0,
1052 LOperand* temp1,
1053 LOperand* temp2,
1054 BuiltinFunctionId op) {
1055 inputs_[0] = left;
1056 inputs_[1] = right;
1057 temps_[0] = temp0;
1058 temps_[1] = temp1;
1059 temps_[2] = temp2;
1060 op_ = op;
1061 }
1062
1063 bool IsMin() { return op_ == kMathMin; }
1064
1065 DECLARE_CONCRETE_INSTRUCTION(MathMinMax, "math-min-max")
1066 DECLARE_HYDROGEN_ACCESSOR(MathMinMax)
1067
1068 private:
1069 BuiltinFunctionId op_;
1070 };
1071
1072
1046 class LArithmeticD: public LTemplateInstruction<1, 2, 0> { 1073 class LArithmeticD: public LTemplateInstruction<1, 2, 0> {
1047 public: 1074 public:
1048 LArithmeticD(Token::Value op, LOperand* left, LOperand* right) 1075 LArithmeticD(Token::Value op, LOperand* left, LOperand* right)
1049 : op_(op) { 1076 : op_(op) {
1050 inputs_[0] = left; 1077 inputs_[0] = left;
1051 inputs_[1] = right; 1078 inputs_[1] = right;
1052 } 1079 }
1053 1080
1054 Token::Value op() const { return op_; } 1081 Token::Value op() const { return op_; }
1055 1082
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 2402
2376 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2403 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2377 }; 2404 };
2378 2405
2379 #undef DECLARE_HYDROGEN_ACCESSOR 2406 #undef DECLARE_HYDROGEN_ACCESSOR
2380 #undef DECLARE_CONCRETE_INSTRUCTION 2407 #undef DECLARE_CONCRETE_INSTRUCTION
2381 2408
2382 } } // namespace v8::internal 2409 } } // namespace v8::internal
2383 2410
2384 #endif // V8_IA32_LITHIUM_IA32_H_ 2411 #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