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 double ClobberDoubleRegisters(double x1, double x2, double x3, double x4); |
| 293 |
| 294 |
| 295 #ifdef DEBUG |
| 296 #define CLOBBER_DOUBLE_REGISTERS() ClobberDoubleRegisters(1, 2, 3, 4); |
| 297 #else |
| 298 #define CLOBBER_DOUBLE_REGISTERS() |
| 299 #endif |
| 300 |
| 301 |
292 #define DECLARE_RUNTIME_FUNCTION(Type, Name) \ | 302 #define DECLARE_RUNTIME_FUNCTION(Type, Name) \ |
293 Type Name(int args_length, Object** args_object, Isolate* isolate) | 303 Type Name(int args_length, Object** args_object, Isolate* isolate) |
294 | 304 |
295 #define RUNTIME_FUNCTION(Type, Name) \ | 305 #define RUNTIME_FUNCTION(Type, Name) \ |
296 static Type __RT_impl_##Name(Arguments args, Isolate* isolate); \ | 306 static Type __RT_impl_##Name(Arguments args, Isolate* isolate); \ |
297 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(); \ |
298 Arguments args(args_length, args_object); \ | 309 Arguments args(args_length, args_object); \ |
299 return __RT_impl_##Name(args, isolate); \ | 310 return __RT_impl_##Name(args, isolate); \ |
300 } \ | 311 } \ |
301 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) | 312 static Type __RT_impl_##Name(Arguments args, Isolate* isolate) |
302 | 313 |
303 #define RUNTIME_ARGUMENTS(isolate, args) \ | 314 #define RUNTIME_ARGUMENTS(isolate, args) \ |
304 args.length(), args.arguments(), isolate | 315 args.length(), args.arguments(), isolate |
305 | 316 |
306 } } // namespace v8::internal | 317 } } // namespace v8::internal |
307 | 318 |
308 #endif // V8_ARGUMENTS_H_ | 319 #endif // V8_ARGUMENTS_H_ |
OLD | NEW |