Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 460 | 460 |
| 461 | 461 |
| 462 // An ExternalReference represents a C++ address used in the generated | 462 // An ExternalReference represents a C++ address used in the generated |
| 463 // code. All references to C++ functions and variables must be encapsulated in | 463 // code. All references to C++ functions and variables must be encapsulated in |
| 464 // an ExternalReference instance. This is done in order to track the origin of | 464 // an ExternalReference instance. This is done in order to track the origin of |
| 465 // all external references in the code so that they can be bound to the correct | 465 // all external references in the code so that they can be bound to the correct |
| 466 // addresses when deserializing a heap. | 466 // addresses when deserializing a heap. |
| 467 class ExternalReference BASE_EMBEDDED { | 467 class ExternalReference BASE_EMBEDDED { |
| 468 public: | 468 public: |
| 469 // Used in the simulator to support different native api calls. | 469 // Used in the simulator to support different native api calls. |
| 470 // | |
| 471 // BUILTIN_CALL - builtin call. | |
| 472 // MaybeObject* f(v8::internal::Arguments). | |
| 473 // | |
| 474 // FP_RETURN_CALL - builtin call that returns floating point. | |
| 475 // double f(double, double). | |
| 476 // | |
| 477 // DIRECT_CALL - direct call to API function native callback | |
| 478 // from generated code. | |
| 479 // Handle<Value> f(v8::Arguments&) | |
| 480 // | |
| 481 enum Type { | 470 enum Type { |
| 471 // Builtin call. | |
| 472 // MaybeObject* f(v8::internal::Arguments). | |
| 482 BUILTIN_CALL, // default | 473 BUILTIN_CALL, // default |
| 474 | |
| 475 // Builtin call that returns floating point. | |
| 476 // double f(double, double). | |
| 483 FP_RETURN_CALL, | 477 FP_RETURN_CALL, |
| 484 DIRECT_CALL | 478 |
| 479 // Direct call to API function callback. | |
| 480 // Handle<Value> f(v8::Arguments&) | |
| 481 DIRECT_API_CALL, | |
|
antonm
2011/02/17 16:13:44
again question about DIRECT, maybe just drop it, b
Zaheer
2011/02/21 10:25:35
keeping it for now to differentiate from builtin.
| |
| 482 | |
| 483 // Direct call to accessor getter callback. | |
| 484 // Handle<value> f(Local<String> property, AccessorInfo& info) | |
| 485 DIRECT_LOAD_CALL | |
|
antonm
2011/02/17 16:13:44
Please, do not use load and use getter or callback
Zaheer
2011/02/21 10:25:35
Done.
| |
| 485 }; | 486 }; |
| 486 | 487 |
| 487 typedef void* ExternalReferenceRedirector(void* original, Type type); | 488 typedef void* ExternalReferenceRedirector(void* original, Type type); |
| 488 | 489 |
| 489 explicit ExternalReference(Builtins::CFunctionId id); | 490 explicit ExternalReference(Builtins::CFunctionId id); |
| 490 | 491 |
| 491 explicit ExternalReference(ApiFunction* ptr, Type type); | 492 explicit ExternalReference(ApiFunction* ptr, Type type); |
| 492 | 493 |
| 493 explicit ExternalReference(Builtins::Name name); | 494 explicit ExternalReference(Builtins::Name name); |
| 494 | 495 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 763 return num_bits_set; | 764 return num_bits_set; |
| 764 } | 765 } |
| 765 | 766 |
| 766 // Computes pow(x, y) with the special cases in the spec for Math.pow. | 767 // Computes pow(x, y) with the special cases in the spec for Math.pow. |
| 767 double power_double_int(double x, int y); | 768 double power_double_int(double x, int y); |
| 768 double power_double_double(double x, double y); | 769 double power_double_double(double x, double y); |
| 769 | 770 |
| 770 } } // namespace v8::internal | 771 } } // namespace v8::internal |
| 771 | 772 |
| 772 #endif // V8_ASSEMBLER_H_ | 773 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |