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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 namespace internal { | 43 namespace internal { |
44 | 44 |
45 | 45 |
46 // ----------------------------------------------------------------------------- | 46 // ----------------------------------------------------------------------------- |
47 // Common double constants. | 47 // Common double constants. |
48 | 48 |
49 class DoubleConstant: public AllStatic { | 49 class DoubleConstant: public AllStatic { |
50 public: | 50 public: |
51 static const double min_int; | 51 static const double min_int; |
52 static const double one_half; | 52 static const double one_half; |
| 53 static const double negative_infinity; |
53 }; | 54 }; |
54 | 55 |
55 | 56 |
56 // ----------------------------------------------------------------------------- | 57 // ----------------------------------------------------------------------------- |
57 // Labels represent pc locations; they are typically jump or call targets. | 58 // Labels represent pc locations; they are typically jump or call targets. |
58 // After declaration, a label can be freely used to denote known or (yet) | 59 // After declaration, a label can be freely used to denote known or (yet) |
59 // unknown pc location. Assembler::bind() is used to bind a label to the | 60 // unknown pc location. Assembler::bind() is used to bind a label to the |
60 // current pc. A label can be bound only once. | 61 // current pc. A label can be bound only once. |
61 | 62 |
62 class Label BASE_EMBEDDED { | 63 class Label BASE_EMBEDDED { |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 static ExternalReference new_space_start(); | 533 static ExternalReference new_space_start(); |
533 static ExternalReference new_space_mask(); | 534 static ExternalReference new_space_mask(); |
534 static ExternalReference heap_always_allocate_scope_depth(); | 535 static ExternalReference heap_always_allocate_scope_depth(); |
535 | 536 |
536 // Used for fast allocation in generated code. | 537 // Used for fast allocation in generated code. |
537 static ExternalReference new_space_allocation_top_address(); | 538 static ExternalReference new_space_allocation_top_address(); |
538 static ExternalReference new_space_allocation_limit_address(); | 539 static ExternalReference new_space_allocation_limit_address(); |
539 | 540 |
540 static ExternalReference double_fp_operation(Token::Value operation); | 541 static ExternalReference double_fp_operation(Token::Value operation); |
541 static ExternalReference compare_doubles(); | 542 static ExternalReference compare_doubles(); |
| 543 static ExternalReference power_double_double_function(); |
| 544 static ExternalReference power_double_int_function(); |
542 | 545 |
543 static ExternalReference handle_scope_next_address(); | 546 static ExternalReference handle_scope_next_address(); |
544 static ExternalReference handle_scope_limit_address(); | 547 static ExternalReference handle_scope_limit_address(); |
545 static ExternalReference handle_scope_level_address(); | 548 static ExternalReference handle_scope_level_address(); |
546 | 549 |
547 static ExternalReference scheduled_exception_address(); | 550 static ExternalReference scheduled_exception_address(); |
548 | 551 |
549 // Static variables containing common double constants. | 552 // Static variables containing common double constants. |
550 static ExternalReference address_of_min_int(); | 553 static ExternalReference address_of_min_int(); |
551 static ExternalReference address_of_one_half(); | 554 static ExternalReference address_of_one_half(); |
| 555 static ExternalReference address_of_negative_infinity(); |
552 | 556 |
553 Address address() const {return reinterpret_cast<Address>(address_);} | 557 Address address() const {return reinterpret_cast<Address>(address_);} |
554 | 558 |
555 #ifdef ENABLE_DEBUGGER_SUPPORT | 559 #ifdef ENABLE_DEBUGGER_SUPPORT |
556 // Function Debug::Break() | 560 // Function Debug::Break() |
557 static ExternalReference debug_break(); | 561 static ExternalReference debug_break(); |
558 | 562 |
559 // Used to check if single stepping is enabled in generated code. | 563 // Used to check if single stepping is enabled in generated code. |
560 static ExternalReference debug_step_in_fp_address(); | 564 static ExternalReference debug_step_in_fp_address(); |
561 #endif | 565 #endif |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 static inline bool is_uint28(int x) { return is_uintn(x, 28); } | 707 static inline bool is_uint28(int x) { return is_uintn(x, 28); } |
704 | 708 |
705 static inline int NumberOfBitsSet(uint32_t x) { | 709 static inline int NumberOfBitsSet(uint32_t x) { |
706 unsigned int num_bits_set; | 710 unsigned int num_bits_set; |
707 for (num_bits_set = 0; x; x >>= 1) { | 711 for (num_bits_set = 0; x; x >>= 1) { |
708 num_bits_set += x & 1; | 712 num_bits_set += x & 1; |
709 } | 713 } |
710 return num_bits_set; | 714 return num_bits_set; |
711 } | 715 } |
712 | 716 |
| 717 // Computes pow(x, y) with the special cases in the spec for Math.pow. |
| 718 double power_double_int(double x, int y); |
| 719 double power_double_double(double x, double y); |
| 720 |
713 } } // namespace v8::internal | 721 } } // namespace v8::internal |
714 | 722 |
715 #endif // V8_ASSEMBLER_H_ | 723 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |