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