Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: src/assembler.h

Issue 12315005: Constant fold math and string operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: made ctors private Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 unsigned int num_bits_set; 961 unsigned int num_bits_set;
962 for (num_bits_set = 0; x; x >>= 1) { 962 for (num_bits_set = 0; x; x >>= 1) {
963 num_bits_set += x & 1; 963 num_bits_set += x & 1;
964 } 964 }
965 return num_bits_set; 965 return num_bits_set;
966 } 966 }
967 967
968 bool EvalComparison(Token::Value op, double op1, double op2); 968 bool EvalComparison(Token::Value op, double op1, double op2);
969 969
970 // Computes pow(x, y) with the special cases in the spec for Math.pow. 970 // Computes pow(x, y) with the special cases in the spec for Math.pow.
971 double power_helper(double x, double y);
971 double power_double_int(double x, int y); 972 double power_double_int(double x, int y);
972 double power_double_double(double x, double y); 973 double power_double_double(double x, double y);
973 974
974 // Helper class for generating code or data associated with the code 975 // Helper class for generating code or data associated with the code
975 // right after a call instruction. As an example this can be used to 976 // right after a call instruction. As an example this can be used to
976 // generate safepoint data after calls for crankshaft. 977 // generate safepoint data after calls for crankshaft.
977 class CallWrapper { 978 class CallWrapper {
978 public: 979 public:
979 CallWrapper() { } 980 CallWrapper() { }
980 virtual ~CallWrapper() { } 981 virtual ~CallWrapper() { }
981 // Called just before emitting a call. Argument is the size of the generated 982 // Called just before emitting a call. Argument is the size of the generated
982 // call code. 983 // call code.
983 virtual void BeforeCall(int call_size) const = 0; 984 virtual void BeforeCall(int call_size) const = 0;
984 // Called just after emitting a call, i.e., at the return site for the call. 985 // Called just after emitting a call, i.e., at the return site for the call.
985 virtual void AfterCall() const = 0; 986 virtual void AfterCall() const = 0;
986 }; 987 };
987 988
988 class NullCallWrapper : public CallWrapper { 989 class NullCallWrapper : public CallWrapper {
989 public: 990 public:
990 NullCallWrapper() { } 991 NullCallWrapper() { }
991 virtual ~NullCallWrapper() { } 992 virtual ~NullCallWrapper() { }
992 virtual void BeforeCall(int call_size) const { } 993 virtual void BeforeCall(int call_size) const { }
993 virtual void AfterCall() const { } 994 virtual void AfterCall() const { }
994 }; 995 };
995 996
996 } } // namespace v8::internal 997 } } // namespace v8::internal
997 998
998 #endif // V8_ASSEMBLER_H_ 999 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698