| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/runtime/runtime.h" | 7 #include "src/runtime/runtime.h" |
| 8 #include "src/runtime/runtime-utils.h" | 8 #include "src/runtime/runtime-utils.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 // Header of runtime functions. | 13 // Header of runtime functions. |
| 14 #define F(name, number_of_args, result_size) \ | 14 #define F(name, number_of_args, result_size) \ |
| 15 Object* Runtime_##name(int args_length, Object** args_object, \ | 15 Object* Runtime_##name(int args_length, Object** args_object, \ |
| 16 Isolate* isolate); | 16 Isolate* isolate); |
| 17 | 17 |
| 18 #define P(name, number_of_args, result_size) \ | 18 #define P(name, number_of_args, result_size) \ |
| 19 ObjectPair Runtime_##name(int args_length, Object** args_object, \ | 19 ObjectPair Runtime_##name(int args_length, Object** args_object, \ |
| 20 Isolate* isolate); | 20 Isolate* isolate); |
| 21 | 21 |
| 22 // Reference implementation for inlined runtime functions. Only used when the | 22 // Reference implementation for inlined runtime functions. Only used when the |
| 23 // compiler does not support a certain intrinsic. Don't optimize these, but | 23 // compiler does not support a certain intrinsic. Don't optimize these, but |
| 24 // implement the intrinsic in the respective compiler instead. | 24 // implement the intrinsic in the respective compiler instead. |
| 25 // TODO(mstarzinger): These are place-holder stubs for TurboFan and will | |
| 26 // eventually all have a C++ implementation and this macro will be gone. | |
| 27 #define I(name, number_of_args, result_size) \ | 25 #define I(name, number_of_args, result_size) \ |
| 28 Object* RuntimeReference_##name(int args_length, Object** args_object, \ | 26 Object* RuntimeReference_##name(int args_length, Object** args_object, \ |
| 29 Isolate* isolate); | 27 Isolate* isolate); |
| 30 | 28 |
| 31 RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F) | 29 RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F) |
| 32 RUNTIME_FUNCTION_LIST_RETURN_PAIR(P) | 30 RUNTIME_FUNCTION_LIST_RETURN_PAIR(P) |
| 33 INLINE_OPTIMIZED_FUNCTION_LIST(F) | 31 INLINE_OPTIMIZED_FUNCTION_LIST(F) |
| 34 INLINE_FUNCTION_LIST(I) | 32 INLINE_FUNCTION_LIST(I) |
| 35 | 33 |
| 36 #undef I | 34 #undef I |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 111 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 114 } | 112 } |
| 115 | 113 |
| 116 | 114 |
| 117 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { | 115 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { |
| 118 return os << Runtime::FunctionForId(id)->name; | 116 return os << Runtime::FunctionForId(id)->name; |
| 119 } | 117 } |
| 120 | 118 |
| 121 } // namespace internal | 119 } // namespace internal |
| 122 } // namespace v8 | 120 } // namespace v8 |
| OLD | NEW |