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_ = | 2396 formal_parameter_count_ = known_function.is_null() |
2397 known_function.is_null() | 2397 ? 0 : known_function->shared()->formal_parameter_count(); |
2398 ? 0 | |
2399 : known_function->shared()->internal_formal_parameter_count(); | |
2400 has_stack_check_ = !known_function.is_null() && | 2398 has_stack_check_ = !known_function.is_null() && |
2401 (known_function->code()->kind() == Code::FUNCTION || | 2399 (known_function->code()->kind() == Code::FUNCTION || |
2402 known_function->code()->kind() == Code::OPTIMIZED_FUNCTION); | 2400 known_function->code()->kind() == Code::OPTIMIZED_FUNCTION); |
2403 } | 2401 } |
2404 | 2402 |
2405 static HInvokeFunction* New(Isolate* isolate, Zone* zone, HValue* context, | 2403 static HInvokeFunction* New(Isolate* isolate, Zone* zone, HValue* context, |
2406 HValue* function, | 2404 HValue* function, |
2407 Handle<JSFunction> known_function, | 2405 Handle<JSFunction> known_function, |
2408 int argument_count) { | 2406 int argument_count) { |
2409 return new(zone) HInvokeFunction(context, function, | 2407 return new(zone) HInvokeFunction(context, function, |
(...skipping 5588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7998 }; | 7996 }; |
7999 | 7997 |
8000 | 7998 |
8001 | 7999 |
8002 #undef DECLARE_INSTRUCTION | 8000 #undef DECLARE_INSTRUCTION |
8003 #undef DECLARE_CONCRETE_INSTRUCTION | 8001 #undef DECLARE_CONCRETE_INSTRUCTION |
8004 | 8002 |
8005 } } // namespace v8::internal | 8003 } } // namespace v8::internal |
8006 | 8004 |
8007 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 8005 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |