| 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 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 955 unsigned int num_bits_set; | 955 unsigned int num_bits_set; |
| 956 for (num_bits_set = 0; x; x >>= 1) { | 956 for (num_bits_set = 0; x; x >>= 1) { |
| 957 num_bits_set += x & 1; | 957 num_bits_set += x & 1; |
| 958 } | 958 } |
| 959 return num_bits_set; | 959 return num_bits_set; |
| 960 } | 960 } |
| 961 | 961 |
| 962 bool EvalComparison(Token::Value op, double op1, double op2); | 962 bool EvalComparison(Token::Value op, double op1, double op2); |
| 963 | 963 |
| 964 // Computes pow(x, y) with the special cases in the spec for Math.pow. | 964 // Computes pow(x, y) with the special cases in the spec for Math.pow. |
| 965 double power_helper(double x, double y); |
| 965 double power_double_int(double x, int y); | 966 double power_double_int(double x, int y); |
| 966 double power_double_double(double x, double y); | 967 double power_double_double(double x, double y); |
| 967 | 968 |
| 968 // Helper class for generating code or data associated with the code | 969 // Helper class for generating code or data associated with the code |
| 969 // right after a call instruction. As an example this can be used to | 970 // right after a call instruction. As an example this can be used to |
| 970 // generate safepoint data after calls for crankshaft. | 971 // generate safepoint data after calls for crankshaft. |
| 971 class CallWrapper { | 972 class CallWrapper { |
| 972 public: | 973 public: |
| 973 CallWrapper() { } | 974 CallWrapper() { } |
| 974 virtual ~CallWrapper() { } | 975 virtual ~CallWrapper() { } |
| 975 // Called just before emitting a call. Argument is the size of the generated | 976 // Called just before emitting a call. Argument is the size of the generated |
| 976 // call code. | 977 // call code. |
| 977 virtual void BeforeCall(int call_size) const = 0; | 978 virtual void BeforeCall(int call_size) const = 0; |
| 978 // Called just after emitting a call, i.e., at the return site for the call. | 979 // Called just after emitting a call, i.e., at the return site for the call. |
| 979 virtual void AfterCall() const = 0; | 980 virtual void AfterCall() const = 0; |
| 980 }; | 981 }; |
| 981 | 982 |
| 982 class NullCallWrapper : public CallWrapper { | 983 class NullCallWrapper : public CallWrapper { |
| 983 public: | 984 public: |
| 984 NullCallWrapper() { } | 985 NullCallWrapper() { } |
| 985 virtual ~NullCallWrapper() { } | 986 virtual ~NullCallWrapper() { } |
| 986 virtual void BeforeCall(int call_size) const { } | 987 virtual void BeforeCall(int call_size) const { } |
| 987 virtual void AfterCall() const { } | 988 virtual void AfterCall() const { } |
| 988 }; | 989 }; |
| 989 | 990 |
| 990 } } // namespace v8::internal | 991 } } // namespace v8::internal |
| 991 | 992 |
| 992 #endif // V8_ASSEMBLER_H_ | 993 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |