OLD | NEW |
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 V(FixedArrayLength) \ | 107 V(FixedArrayLength) \ |
108 V(FunctionLiteral) \ | 108 V(FunctionLiteral) \ |
109 V(GetCachedArrayIndex) \ | 109 V(GetCachedArrayIndex) \ |
110 V(GlobalObject) \ | 110 V(GlobalObject) \ |
111 V(GlobalReceiver) \ | 111 V(GlobalReceiver) \ |
112 V(Goto) \ | 112 V(Goto) \ |
113 V(HasInstanceType) \ | 113 V(HasInstanceType) \ |
114 V(HasCachedArrayIndex) \ | 114 V(HasCachedArrayIndex) \ |
115 V(InstanceOf) \ | 115 V(InstanceOf) \ |
116 V(InstanceOfKnownGlobal) \ | 116 V(InstanceOfKnownGlobal) \ |
| 117 V(InvokeFunction) \ |
117 V(IsNull) \ | 118 V(IsNull) \ |
118 V(IsObject) \ | 119 V(IsObject) \ |
119 V(IsSmi) \ | 120 V(IsSmi) \ |
120 V(IsConstructCall) \ | 121 V(IsConstructCall) \ |
121 V(JSArrayLength) \ | 122 V(JSArrayLength) \ |
122 V(LeaveInlined) \ | 123 V(LeaveInlined) \ |
123 V(LoadContextSlot) \ | 124 V(LoadContextSlot) \ |
124 V(LoadElements) \ | 125 V(LoadElements) \ |
125 V(LoadExternalArrayPointer) \ | 126 V(LoadExternalArrayPointer) \ |
126 V(LoadFunctionPrototype) \ | 127 V(LoadFunctionPrototype) \ |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 return Representation::Tagged(); | 1237 return Representation::Tagged(); |
1237 } | 1238 } |
1238 | 1239 |
1239 HValue* first() { return OperandAt(0); } | 1240 HValue* first() { return OperandAt(0); } |
1240 HValue* second() { return OperandAt(1); } | 1241 HValue* second() { return OperandAt(1); } |
1241 | 1242 |
1242 DECLARE_INSTRUCTION(BinaryCall) | 1243 DECLARE_INSTRUCTION(BinaryCall) |
1243 }; | 1244 }; |
1244 | 1245 |
1245 | 1246 |
| 1247 class HInvokeFunction: public HBinaryCall { |
| 1248 public: |
| 1249 HInvokeFunction(HValue* context, HValue* function, int argument_count) |
| 1250 : HBinaryCall(context, function, argument_count) { |
| 1251 } |
| 1252 |
| 1253 virtual Representation RequiredInputRepresentation(int index) const { |
| 1254 return Representation::Tagged(); |
| 1255 } |
| 1256 |
| 1257 HValue* context() { return first(); } |
| 1258 HValue* function() { return second(); } |
| 1259 |
| 1260 DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke_function") |
| 1261 }; |
| 1262 |
| 1263 |
1246 class HCallConstantFunction: public HCall<0> { | 1264 class HCallConstantFunction: public HCall<0> { |
1247 public: | 1265 public: |
1248 HCallConstantFunction(Handle<JSFunction> function, int argument_count) | 1266 HCallConstantFunction(Handle<JSFunction> function, int argument_count) |
1249 : HCall<0>(argument_count), function_(function) { } | 1267 : HCall<0>(argument_count), function_(function) { } |
1250 | 1268 |
1251 Handle<JSFunction> function() const { return function_; } | 1269 Handle<JSFunction> function() const { return function_; } |
1252 | 1270 |
1253 bool IsApplyFunction() const { | 1271 bool IsApplyFunction() const { |
1254 return function_->code() == | 1272 return function_->code() == |
1255 Isolate::Current()->builtins()->builtin(Builtins::kFunctionApply); | 1273 Isolate::Current()->builtins()->builtin(Builtins::kFunctionApply); |
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3670 HValue* object() { return left(); } | 3688 HValue* object() { return left(); } |
3671 HValue* key() { return right(); } | 3689 HValue* key() { return right(); } |
3672 }; | 3690 }; |
3673 | 3691 |
3674 #undef DECLARE_INSTRUCTION | 3692 #undef DECLARE_INSTRUCTION |
3675 #undef DECLARE_CONCRETE_INSTRUCTION | 3693 #undef DECLARE_CONCRETE_INSTRUCTION |
3676 | 3694 |
3677 } } // namespace v8::internal | 3695 } } // namespace v8::internal |
3678 | 3696 |
3679 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3697 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |