| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #endif // Target architecture. | 60 #endif // Target architecture. |
| 61 #endif // V8_INTERPRETED_REGEXP | 61 #endif // V8_INTERPRETED_REGEXP |
| 62 | 62 |
| 63 namespace v8 { | 63 namespace v8 { |
| 64 namespace internal { | 64 namespace internal { |
| 65 | 65 |
| 66 | 66 |
| 67 const double DoubleConstant::min_int = kMinInt; | 67 const double DoubleConstant::min_int = kMinInt; |
| 68 const double DoubleConstant::one_half = 0.5; | 68 const double DoubleConstant::one_half = 0.5; |
| 69 const double DoubleConstant::minus_zero = -0.0; | 69 const double DoubleConstant::minus_zero = -0.0; |
| 70 const double DoubleConstant::nan = OS::nan_value(); |
| 70 const double DoubleConstant::negative_infinity = -V8_INFINITY; | 71 const double DoubleConstant::negative_infinity = -V8_INFINITY; |
| 71 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; | 72 const char* RelocInfo::kFillerCommentString = "DEOPTIMIZATION PADDING"; |
| 72 | 73 |
| 73 // ----------------------------------------------------------------------------- | 74 // ----------------------------------------------------------------------------- |
| 74 // Implementation of Label | 75 // Implementation of Label |
| 75 | 76 |
| 76 int Label::pos() const { | 77 int Label::pos() const { |
| 77 if (pos_ < 0) return -pos_ - 1; | 78 if (pos_ < 0) return -pos_ - 1; |
| 78 if (pos_ > 0) return pos_ - 1; | 79 if (pos_ > 0) return pos_ - 1; |
| 79 UNREACHABLE(); | 80 UNREACHABLE(); |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 const_cast<double*>(&DoubleConstant::minus_zero))); | 739 const_cast<double*>(&DoubleConstant::minus_zero))); |
| 739 } | 740 } |
| 740 | 741 |
| 741 | 742 |
| 742 ExternalReference ExternalReference::address_of_negative_infinity() { | 743 ExternalReference ExternalReference::address_of_negative_infinity() { |
| 743 return ExternalReference(reinterpret_cast<void*>( | 744 return ExternalReference(reinterpret_cast<void*>( |
| 744 const_cast<double*>(&DoubleConstant::negative_infinity))); | 745 const_cast<double*>(&DoubleConstant::negative_infinity))); |
| 745 } | 746 } |
| 746 | 747 |
| 747 | 748 |
| 749 ExternalReference ExternalReference::address_of_nan() { |
| 750 return ExternalReference(reinterpret_cast<void*>( |
| 751 const_cast<double*>(&DoubleConstant::nan))); |
| 752 } |
| 753 |
| 754 |
| 748 #ifndef V8_INTERPRETED_REGEXP | 755 #ifndef V8_INTERPRETED_REGEXP |
| 749 | 756 |
| 750 ExternalReference ExternalReference::re_check_stack_guard_state() { | 757 ExternalReference ExternalReference::re_check_stack_guard_state() { |
| 751 Address function; | 758 Address function; |
| 752 #ifdef V8_TARGET_ARCH_X64 | 759 #ifdef V8_TARGET_ARCH_X64 |
| 753 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); | 760 function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState); |
| 754 #elif V8_TARGET_ARCH_IA32 | 761 #elif V8_TARGET_ARCH_IA32 |
| 755 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); | 762 function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState); |
| 756 #elif V8_TARGET_ARCH_ARM | 763 #elif V8_TARGET_ARCH_ARM |
| 757 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); | 764 function = FUNCTION_ADDR(RegExpMacroAssemblerARM::CheckStackGuardState); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1004 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 998 state_.written_position = state_.current_position; | 1005 state_.written_position = state_.current_position; |
| 999 written = true; | 1006 written = true; |
| 1000 } | 1007 } |
| 1001 | 1008 |
| 1002 // Return whether something was written. | 1009 // Return whether something was written. |
| 1003 return written; | 1010 return written; |
| 1004 } | 1011 } |
| 1005 | 1012 |
| 1006 } } // namespace v8::internal | 1013 } } // namespace v8::internal |
| OLD | NEW |