| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 static inline bool is_uint28(int x) { return is_uintn(x, 28); } | 826 static inline bool is_uint28(int x) { return is_uintn(x, 28); } |
| 827 | 827 |
| 828 static inline int NumberOfBitsSet(uint32_t x) { | 828 static inline int NumberOfBitsSet(uint32_t x) { |
| 829 unsigned int num_bits_set; | 829 unsigned int num_bits_set; |
| 830 for (num_bits_set = 0; x; x >>= 1) { | 830 for (num_bits_set = 0; x; x >>= 1) { |
| 831 num_bits_set += x & 1; | 831 num_bits_set += x & 1; |
| 832 } | 832 } |
| 833 return num_bits_set; | 833 return num_bits_set; |
| 834 } | 834 } |
| 835 | 835 |
| 836 bool EvalComparison(Token::Value op, double op1, double op2); |
| 837 |
| 836 // Computes pow(x, y) with the special cases in the spec for Math.pow. | 838 // Computes pow(x, y) with the special cases in the spec for Math.pow. |
| 837 double power_double_int(double x, int y); | 839 double power_double_int(double x, int y); |
| 838 double power_double_double(double x, double y); | 840 double power_double_double(double x, double y); |
| 839 | 841 |
| 840 // Helper class for generating code or data associated with the code | 842 // Helper class for generating code or data associated with the code |
| 841 // right after a call instruction. As an example this can be used to | 843 // right after a call instruction. As an example this can be used to |
| 842 // generate safepoint data after calls for crankshaft. | 844 // generate safepoint data after calls for crankshaft. |
| 843 class CallWrapper { | 845 class CallWrapper { |
| 844 public: | 846 public: |
| 845 CallWrapper() { } | 847 CallWrapper() { } |
| 846 virtual ~CallWrapper() { } | 848 virtual ~CallWrapper() { } |
| 847 // Called just before emitting a call. Argument is the size of the generated | 849 // Called just before emitting a call. Argument is the size of the generated |
| 848 // call code. | 850 // call code. |
| 849 virtual void BeforeCall(int call_size) const = 0; | 851 virtual void BeforeCall(int call_size) const = 0; |
| 850 // Called just after emitting a call, i.e., at the return site for the call. | 852 // Called just after emitting a call, i.e., at the return site for the call. |
| 851 virtual void AfterCall() const = 0; | 853 virtual void AfterCall() const = 0; |
| 852 }; | 854 }; |
| 853 | 855 |
| 854 class NullCallWrapper : public CallWrapper { | 856 class NullCallWrapper : public CallWrapper { |
| 855 public: | 857 public: |
| 856 NullCallWrapper() { } | 858 NullCallWrapper() { } |
| 857 virtual ~NullCallWrapper() { } | 859 virtual ~NullCallWrapper() { } |
| 858 virtual void BeforeCall(int call_size) const { } | 860 virtual void BeforeCall(int call_size) const { } |
| 859 virtual void AfterCall() const { } | 861 virtual void AfterCall() const { } |
| 860 }; | 862 }; |
| 861 | 863 |
| 862 } } // namespace v8::internal | 864 } } // namespace v8::internal |
| 863 | 865 |
| 864 #endif // V8_ASSEMBLER_H_ | 866 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |