OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); | 292 double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); |
293 | 293 |
294 | 294 |
295 #ifdef DEBUG | 295 #ifdef DEBUG |
296 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4); | 296 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4); |
297 #else | 297 #else |
298 #define CLOBBER_DOUBLE_REGISTERS() | 298 #define CLOBBER_DOUBLE_REGISTERS() |
299 #endif | 299 #endif |
300 | 300 |
301 | 301 |
302 #define DECLARE_RUNTIME_FUNCTION(Type, Name) \ | 302 #define DECLARE_RUNTIME_FUNCTION(Name) \ |
303 Type Name(int args_length, Object** args_object, Isolate* isolate) | 303 Object* Name(int args_length, Object** args_object, Isolate* isolate) |
304 | 304 |
305 #define RUNTIME_FUNCTION(Type, Name) \ | 305 #define RUNTIME_FUNCTION_RETURNS_TYPE(Type, Name) \ |
306 static Type __RT_impl_##Name(Arguments args, Isolate* isolate); \ | 306 static Type __RT_impl_##Name(Arguments args, Isolate* isolate); \ |
307 Type Name(int args_length, Object** args_object, Isolate* isolate) { \ | 307 Type Name(int args_length, Object** args_object, Isolate* isolate) { \ |
308 CLOBBER_DOUBLE_REGISTERS(); \ | 308 CLOBBER_DOUBLE_REGISTERS(); \ |
309 Arguments args(args_length, args_object); \ | 309 Arguments args(args_length, args_object); \ |
310 return __RT_impl_##Name(args, isolate); \ | 310 return __RT_impl_##Name(args, isolate); \ |
311 } \ | 311 } \ |
312 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) | 312 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) |
313 | 313 |
| 314 |
| 315 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name) |
| 316 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \ |
| 317 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name) |
| 318 |
314 #define RUNTIME_ARGUMENTS(isolate, args) \ | 319 #define RUNTIME_ARGUMENTS(isolate, args) \ |
315 args.length(), args.arguments(), isolate | 320 args.length(), args.arguments(), isolate |
316 | 321 |
317 } } // namespace v8::internal | 322 } } // namespace v8::internal |
318 | 323 |
319 #endif // V8_ARGUMENTS_H_ | 324 #endif // V8_ARGUMENTS_H_ |
OLD | NEW |