| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 | 474 |
| 475 | 475 |
| 476 // An ExternalReference represents a C++ address used in the generated | 476 // An ExternalReference represents a C++ address used in the generated |
| 477 // code. All references to C++ functions and variables must be encapsulated in | 477 // code. All references to C++ functions and variables must be encapsulated in |
| 478 // an ExternalReference instance. This is done in order to track the origin of | 478 // an ExternalReference instance. This is done in order to track the origin of |
| 479 // all external references in the code so that they can be bound to the correct | 479 // all external references in the code so that they can be bound to the correct |
| 480 // addresses when deserializing a heap. | 480 // addresses when deserializing a heap. |
| 481 class ExternalReference BASE_EMBEDDED { | 481 class ExternalReference BASE_EMBEDDED { |
| 482 public: | 482 public: |
| 483 // Used in the simulator to support different native api calls. | 483 // Used in the simulator to support different native api calls. |
| 484 // | |
| 485 // BUILTIN_CALL - builtin call. | |
| 486 // MaybeObject* f(v8::internal::Arguments). | |
| 487 // | |
| 488 // FP_RETURN_CALL - builtin call that returns floating point. | |
| 489 // double f(double, double). | |
| 490 // | |
| 491 // DIRECT_CALL - direct call to API function native callback | |
| 492 // from generated code. | |
| 493 // Handle<Value> f(v8::Arguments&) | |
| 494 // | |
| 495 enum Type { | 484 enum Type { |
| 485 // Builtin call. |
| 486 // MaybeObject* f(v8::internal::Arguments). |
| 496 BUILTIN_CALL, // default | 487 BUILTIN_CALL, // default |
| 488 |
| 489 // Builtin call that returns floating point. |
| 490 // double f(double, double). |
| 497 FP_RETURN_CALL, | 491 FP_RETURN_CALL, |
| 498 DIRECT_CALL | 492 |
| 493 // Direct call to API function callback. |
| 494 // Handle<Value> f(v8::Arguments&) |
| 495 DIRECT_API_CALL, |
| 496 |
| 497 // Direct call to accessor getter callback. |
| 498 // Handle<value> f(Local<String> property, AccessorInfo& info) |
| 499 DIRECT_GETTER_CALL |
| 499 }; | 500 }; |
| 500 | 501 |
| 501 typedef void* ExternalReferenceRedirector(void* original, Type type); | 502 typedef void* ExternalReferenceRedirector(void* original, Type type); |
| 502 | 503 |
| 503 explicit ExternalReference(Builtins::CFunctionId id); | 504 explicit ExternalReference(Builtins::CFunctionId id); |
| 504 | 505 |
| 505 explicit ExternalReference(ApiFunction* ptr, Type type); | 506 explicit ExternalReference(ApiFunction* ptr, Type type); |
| 506 | 507 |
| 507 explicit ExternalReference(Builtins::Name name); | 508 explicit ExternalReference(Builtins::Name name); |
| 508 | 509 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 return num_bits_set; | 778 return num_bits_set; |
| 778 } | 779 } |
| 779 | 780 |
| 780 // Computes pow(x, y) with the special cases in the spec for Math.pow. | 781 // Computes pow(x, y) with the special cases in the spec for Math.pow. |
| 781 double power_double_int(double x, int y); | 782 double power_double_int(double x, int y); |
| 782 double power_double_double(double x, double y); | 783 double power_double_double(double x, double y); |
| 783 | 784 |
| 784 } } // namespace v8::internal | 785 } } // namespace v8::internal |
| 785 | 786 |
| 786 #endif // V8_ASSEMBLER_H_ | 787 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |