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

Side by Side Diff: src/arguments.h

Issue 307543009: Force inline runtime functions into its wrapper. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 #ifndef V8_ARGUMENTS_H_ 5 #ifndef V8_ARGUMENTS_H_
6 #define V8_ARGUMENTS_H_ 6 #define V8_ARGUMENTS_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 #ifdef DEBUG 272 #ifdef DEBUG
273 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4); 273 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4);
274 #else 274 #else
275 #define CLOBBER_DOUBLE_REGISTERS() 275 #define CLOBBER_DOUBLE_REGISTERS()
276 #endif 276 #endif
277 277
278 278
279 #define DECLARE_RUNTIME_FUNCTION(Name) \ 279 #define DECLARE_RUNTIME_FUNCTION(Name) \
280 Object* Name(int args_length, Object** args_object, Isolate* isolate) 280 Object* Name(int args_length, Object** args_object, Isolate* isolate)
281 281
282 #define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name) \ 282 #define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name) \
283 static Type __RT_impl_##Name(Arguments args, Isolate* isolate); \ 283 static INLINE(Type __RT_impl_##Name(Arguments args, Isolate* isolate)); \
284 Type Name(int args_length, Object** args_object, Isolate* isolate) { \ 284 Type Name(int args_length, Object** args_object, Isolate* isolate) { \
285 CLOBBER_DOUBLE_REGISTERS(); \ 285 CLOBBER_DOUBLE_REGISTERS(); \
286 Arguments args(args_length, args_object); \ 286 Arguments args(args_length, args_object); \
287 return __RT_impl_##Name(args, isolate); \ 287 return __RT_impl_##Name(args, isolate); \
288 } \ 288 } \
289 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) 289 static Type __RT_impl_##Name(Arguments args, Isolate* isolate)
290 290
291 291
292 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name) 292 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name)
293 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \ 293 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \
294 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name) 294 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name)
295 295
296 #define RUNTIME_ARGUMENTS(isolate, args) \ 296 #define RUNTIME_ARGUMENTS(isolate, args) \
297 args.length(), args.arguments(), isolate 297 args.length(), args.arguments(), isolate
298 298
299 } } // namespace v8::internal 299 } } // namespace v8::internal
300 300
301 #endif // V8_ARGUMENTS_H_ 301 #endif // V8_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698