| 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 FOR_EACH_INTRINSIC_RETURN_OBJECT(F) |
| 18 #undef F |
| 17 | 19 |
| 18 #define P(name, number_of_args, result_size) \ | 20 #define P(name, number_of_args, result_size) \ |
| 19 ObjectPair Runtime_##name(int args_length, Object** args_object, \ | 21 ObjectPair Runtime_##name(int args_length, Object** args_object, \ |
| 20 Isolate* isolate); | 22 Isolate* isolate); |
| 21 | 23 FOR_EACH_INTRINSIC_RETURN_PAIR(P) |
| 22 RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F) | |
| 23 RUNTIME_FUNCTION_LIST_RETURN_PAIR(P) | |
| 24 INLINE_OPTIMIZED_FUNCTION_LIST(F) | |
| 25 // Reference implementation for inlined runtime functions. Only used when the | |
| 26 // compiler does not support a certain intrinsic. Don't optimize these, but | |
| 27 // implement the intrinsic in the respective compiler instead. | |
| 28 INLINE_FUNCTION_LIST(F) | |
| 29 | |
| 30 #undef F | |
| 31 #undef P | 24 #undef P |
| 32 | 25 |
| 33 | 26 |
| 34 #define F(name, number_of_args, result_size) \ | 27 #define F(name, number_of_args, result_size) \ |
| 35 { \ | 28 { \ |
| 36 Runtime::k##name, Runtime::RUNTIME, #name, FUNCTION_ADDR(Runtime_##name), \ | 29 Runtime::k##name, Runtime::RUNTIME, #name, FUNCTION_ADDR(Runtime_##name), \ |
| 37 number_of_args, result_size \ | 30 number_of_args, result_size \ |
| 38 } \ | 31 } \ |
| 39 , | 32 , |
| 40 | 33 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 89 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 97 } | 90 } |
| 98 | 91 |
| 99 | 92 |
| 100 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { | 93 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { |
| 101 return os << Runtime::FunctionForId(id)->name; | 94 return os << Runtime::FunctionForId(id)->name; |
| 102 } | 95 } |
| 103 | 96 |
| 104 } // namespace internal | 97 } // namespace internal |
| 105 } // namespace v8 | 98 } // namespace v8 |
| OLD | NEW |