| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2386 class HInvokeFunction FINAL : public HBinaryCall { | 2386 class HInvokeFunction FINAL : public HBinaryCall { |
| 2387 public: | 2387 public: |
| 2388 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInvokeFunction, HValue*, int); | 2388 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInvokeFunction, HValue*, int); |
| 2389 | 2389 |
| 2390 HInvokeFunction(HValue* context, | 2390 HInvokeFunction(HValue* context, |
| 2391 HValue* function, | 2391 HValue* function, |
| 2392 Handle<JSFunction> known_function, | 2392 Handle<JSFunction> known_function, |
| 2393 int argument_count) | 2393 int argument_count) |
| 2394 : HBinaryCall(context, function, argument_count), | 2394 : HBinaryCall(context, function, argument_count), |
| 2395 known_function_(known_function) { | 2395 known_function_(known_function) { |
| 2396 formal_parameter_count_ = known_function.is_null() | 2396 formal_parameter_count_ = |
| 2397 ? 0 : known_function->shared()->formal_parameter_count(); | 2397 known_function.is_null() |
| 2398 ? 0 |
| 2399 : known_function->shared()->internal_formal_parameter_count(); |
| 2398 has_stack_check_ = !known_function.is_null() && | 2400 has_stack_check_ = !known_function.is_null() && |
| 2399 (known_function->code()->kind() == Code::FUNCTION || | 2401 (known_function->code()->kind() == Code::FUNCTION || |
| 2400 known_function->code()->kind() == Code::OPTIMIZED_FUNCTION); | 2402 known_function->code()->kind() == Code::OPTIMIZED_FUNCTION); |
| 2401 } | 2403 } |
| 2402 | 2404 |
| 2403 static HInvokeFunction* New(Isolate* isolate, Zone* zone, HValue* context, | 2405 static HInvokeFunction* New(Isolate* isolate, Zone* zone, HValue* context, |
| 2404 HValue* function, | 2406 HValue* function, |
| 2405 Handle<JSFunction> known_function, | 2407 Handle<JSFunction> known_function, |
| 2406 int argument_count) { | 2408 int argument_count) { |
| 2407 return new(zone) HInvokeFunction(context, function, | 2409 return new(zone) HInvokeFunction(context, function, |
| (...skipping 5588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7996 }; | 7998 }; |
| 7997 | 7999 |
| 7998 | 8000 |
| 7999 | 8001 |
| 8000 #undef DECLARE_INSTRUCTION | 8002 #undef DECLARE_INSTRUCTION |
| 8001 #undef DECLARE_CONCRETE_INSTRUCTION | 8003 #undef DECLARE_CONCRETE_INSTRUCTION |
| 8002 | 8004 |
| 8003 } } // namespace v8::internal | 8005 } } // namespace v8::internal |
| 8004 | 8006 |
| 8005 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 8007 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |