| 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 { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 #define I(name, number_of_args, result_size) \ | 42 #define I(name, number_of_args, result_size) \ |
| 43 { \ | 43 { \ |
| 44 Runtime::kInline##name, Runtime::INLINE, "_" #name, \ | 44 Runtime::kInline##name, Runtime::INLINE, "_" #name, \ |
| 45 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \ | 45 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \ |
| 46 } \ | 46 } \ |
| 47 , | 47 , |
| 48 | 48 |
| 49 | 49 |
| 50 static const Runtime::Function kIntrinsicFunctions[] = { | 50 static const Runtime::Function kIntrinsicFunctions[] = { |
| 51 RUNTIME_FUNCTION_LIST(F) INLINE_FUNCTION_LIST(F) | 51 FOR_EACH_INTRINSIC(F) FOR_EACH_INTRINSIC(I)}; |
| 52 INLINE_OPTIMIZED_FUNCTION_LIST(F) RUNTIME_FUNCTION_LIST(I) | |
| 53 INLINE_FUNCTION_LIST(I) INLINE_OPTIMIZED_FUNCTION_LIST(I)}; | |
| 54 | 52 |
| 55 #undef I | 53 #undef I |
| 56 #undef F | 54 #undef F |
| 57 | 55 |
| 58 | 56 |
| 59 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate, | 57 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate, |
| 60 Handle<NameDictionary> dict) { | 58 Handle<NameDictionary> dict) { |
| 61 DCHECK(dict->NumberOfElements() == 0); | 59 DCHECK(dict->NumberOfElements() == 0); |
| 62 HandleScope scope(isolate); | 60 HandleScope scope(isolate); |
| 63 for (int i = 0; i < kNumFunctions; ++i) { | 61 for (int i = 0; i < kNumFunctions; ++i) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 96 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 99 } | 97 } |
| 100 | 98 |
| 101 | 99 |
| 102 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { | 100 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { |
| 103 return os << Runtime::FunctionForId(id)->name; | 101 return os << Runtime::FunctionForId(id)->name; |
| 104 } | 102 } |
| 105 | 103 |
| 106 } // namespace internal | 104 } // namespace internal |
| 107 } // namespace v8 | 105 } // namespace v8 |
| OLD | NEW |