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 #ifndef V8_ARGUMENTS_H_ | 5 #ifndef V8_ARGUMENTS_H_ |
6 #define V8_ARGUMENTS_H_ | 6 #define V8_ARGUMENTS_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 | 10 |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); | 262 double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); |
263 | 263 |
264 | 264 |
265 #ifdef DEBUG | 265 #ifdef DEBUG |
266 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4); | 266 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4); |
267 #else | 267 #else |
268 #define CLOBBER_DOUBLE_REGISTERS() | 268 #define CLOBBER_DOUBLE_REGISTERS() |
269 #endif | 269 #endif |
270 | 270 |
271 | 271 |
272 #define DECLARE_RUNTIME_FUNCTION(Name) \ | |
273 Object* Name(int args_length, Object** args_object, Isolate* isolate) | |
274 | |
275 #define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name) \ | 272 #define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name) \ |
276 static INLINE(Type __RT_impl_##Name(Arguments args, Isolate* isolate)); \ | 273 static INLINE(Type __RT_impl_##Name(Arguments args, Isolate* isolate)); \ |
277 Type Name(int args_length, Object** args_object, Isolate* isolate) { \ | 274 Type Name(int args_length, Object** args_object, Isolate* isolate) { \ |
278 CLOBBER_DOUBLE_REGISTERS(); \ | 275 CLOBBER_DOUBLE_REGISTERS(); \ |
279 Arguments args(args_length, args_object); \ | 276 Arguments args(args_length, args_object); \ |
280 return __RT_impl_##Name(args, isolate); \ | 277 return __RT_impl_##Name(args, isolate); \ |
281 } \ | 278 } \ |
282 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) | 279 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) |
283 | 280 |
284 | 281 |
285 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name) | 282 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name) |
286 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \ | 283 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \ |
287 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name) | 284 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name) |
288 | 285 |
289 #define RUNTIME_ARGUMENTS(isolate, args) \ | 286 #define RUNTIME_ARGUMENTS(isolate, args) \ |
290 args.length(), args.arguments(), isolate | 287 args.length(), args.arguments(), isolate |
291 | 288 |
292 } } // namespace v8::internal | 289 } } // namespace v8::internal |
293 | 290 |
294 #endif // V8_ARGUMENTS_H_ | 291 #endif // V8_ARGUMENTS_H_ |
OLD | NEW |