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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 */ | 282 */ |
283 v8::Handle<v8::Value> Call(FunctionCallback f); | 283 v8::Handle<v8::Value> Call(FunctionCallback f); |
284 | 284 |
285 private: | 285 private: |
286 internal::Object** argv_; | 286 internal::Object** argv_; |
287 int argc_; | 287 int argc_; |
288 bool is_construct_call_; | 288 bool is_construct_call_; |
289 }; | 289 }; |
290 | 290 |
291 | 291 |
| 292 #ifdef DEBUG |
| 293 double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); |
| 294 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4); |
| 295 #else |
| 296 #define CLOBBER_DOUBLE_REGISTERS() |
| 297 #endif |
| 298 |
| 299 |
292 #define DECLARE_RUNTIME_FUNCTION(Type, Name) \ | 300 #define DECLARE_RUNTIME_FUNCTION(Type, Name) \ |
293 Type Name(int args_length, Object** args_object, Isolate* isolate) | 301 Type Name(int args_length, Object** args_object, Isolate* isolate) |
294 | 302 |
295 #define RUNTIME_FUNCTION(Type, Name) \ | 303 #define RUNTIME_FUNCTION(Type, Name) \ |
296 static Type __RT_impl_##Name(Arguments args, Isolate* isolate); \ | 304 static Type __RT_impl_##Name(Arguments args, Isolate* isolate); \ |
297 Type Name(int args_length, Object** args_object, Isolate* isolate) { \ | 305 Type Name(int args_length, Object** args_object, Isolate* isolate) { \ |
| 306 CLOBBER_DOUBLE_REGISTERS(); \ |
298 Arguments args(args_length, args_object); \ | 307 Arguments args(args_length, args_object); \ |
299 return __RT_impl_##Name(args, isolate); \ | 308 return __RT_impl_##Name(args, isolate); \ |
300 } \ | 309 } \ |
301 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) | 310 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) |
302 | 311 |
303 #define RUNTIME_ARGUMENTS(isolate, args) \ | 312 #define RUNTIME_ARGUMENTS(isolate, args) \ |
304 args.length(), args.arguments(), isolate | 313 args.length(), args.arguments(), isolate |
305 | 314 |
306 } } // namespace v8::internal | 315 } } // namespace v8::internal |
307 | 316 |
308 #endif // V8_ARGUMENTS_H_ | 317 #endif // V8_ARGUMENTS_H_ |
OLD | NEW |