Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: src/runtime/runtime.cc

Issue 983623002: Made the entries of the various *_FUNCTION_LISTs disjoint. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
23 // compiler does not support a certain intrinsic. Don't optimize these, but
24 // implement the intrinsic in the respective compiler instead.
25 #define I(name, number_of_args, result_size) \
26 Object* RuntimeReference_##name(int args_length, Object** args_object, \
27 Isolate* isolate);
28
29 RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F) 22 RUNTIME_FUNCTION_LIST_RETURN_OBJECT(F)
30 RUNTIME_FUNCTION_LIST_RETURN_PAIR(P) 23 RUNTIME_FUNCTION_LIST_RETURN_PAIR(P)
31 INLINE_OPTIMIZED_FUNCTION_LIST(F) 24 INLINE_OPTIMIZED_FUNCTION_LIST(F)
32 INLINE_FUNCTION_LIST(I) 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)
33 29
34 #undef I
35 #undef F 30 #undef F
36 #undef P 31 #undef P
37 32
38 33
39 #define F(name, number_of_args, result_size) \ 34 #define F(name, number_of_args, result_size) \
40 { \ 35 { \
41 Runtime::k##name, Runtime::RUNTIME, #name, FUNCTION_ADDR(Runtime_##name), \ 36 Runtime::k##name, Runtime::RUNTIME, #name, FUNCTION_ADDR(Runtime_##name), \
42 number_of_args, result_size \ 37 number_of_args, result_size \
43 } \ 38 } \
44 , 39 ,
45 40
46 41
47 #define I(name, number_of_args, result_size) \ 42 #define I(name, number_of_args, result_size) \
48 { \ 43 { \
49 Runtime::kInline##name, Runtime::INLINE, "_" #name, \ 44 Runtime::kInline##name, Runtime::INLINE, "_" #name, \
50 FUNCTION_ADDR(RuntimeReference_##name), number_of_args, result_size \ 45 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \
51 } \ 46 } \
52 , 47 ,
53 48
54 49
55 #define IO(name, number_of_args, result_size) \ 50 #define IO(name, number_of_args, result_size) \
56 { \ 51 { \
57 Runtime::kInlineOptimized##name, Runtime::INLINE_OPTIMIZED, "_" #name, \ 52 Runtime::kInlineOptimized##name, Runtime::INLINE_OPTIMIZED, "_" #name, \
58 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \ 53 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \
59 } \ 54 } \
60 , 55 ,
61 56
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return &(kIntrinsicFunctions[static_cast<int>(id)]); 106 return &(kIntrinsicFunctions[static_cast<int>(id)]);
112 } 107 }
113 108
114 109
115 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { 110 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) {
116 return os << Runtime::FunctionForId(id)->name; 111 return os << Runtime::FunctionForId(id)->name;
117 } 112 }
118 113
119 } // namespace internal 114 } // namespace internal
120 } // namespace v8 115 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698