| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "allocation.h" | 8 #include "allocation.h" |
| 9 #include "assert-scope.h" | 9 #include "assert-scope.h" |
| 10 #include "builtins.h" | 10 #include "builtins.h" |
| (...skipping 6834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6845 | 6845 |
| 6846 // List of builtin functions we want to identify to improve code | 6846 // List of builtin functions we want to identify to improve code |
| 6847 // generation. | 6847 // generation. |
| 6848 // | 6848 // |
| 6849 // Each entry has a name of a global object property holding an object | 6849 // Each entry has a name of a global object property holding an object |
| 6850 // optionally followed by ".prototype", a name of a builtin function | 6850 // optionally followed by ".prototype", a name of a builtin function |
| 6851 // on the object (the one the id is set for), and a label. | 6851 // on the object (the one the id is set for), and a label. |
| 6852 // | 6852 // |
| 6853 // Installation of ids for the selected builtin functions is handled | 6853 // Installation of ids for the selected builtin functions is handled |
| 6854 // by the bootstrapper. | 6854 // by the bootstrapper. |
| 6855 #define FUNCTIONS_WITH_ID_LIST(V) \ | 6855 #define FUNCTIONS_WITH_ID_LIST(V) \ |
| 6856 V(Array.prototype, push, ArrayPush) \ | 6856 V(Array.prototype, indexOf, ArrayIndexOf) \ |
| 6857 V(Array.prototype, pop, ArrayPop) \ | 6857 V(Array.prototype, lastIndexOf, ArrayLastIndexOf) \ |
| 6858 V(Array.prototype, shift, ArrayShift) \ | 6858 V(Array.prototype, push, ArrayPush) \ |
| 6859 V(Function.prototype, apply, FunctionApply) \ | 6859 V(Array.prototype, pop, ArrayPop) \ |
| 6860 V(String.prototype, charCodeAt, StringCharCodeAt) \ | 6860 V(Array.prototype, shift, ArrayShift) \ |
| 6861 V(String.prototype, charAt, StringCharAt) \ | 6861 V(Function.prototype, apply, FunctionApply) \ |
| 6862 V(String, fromCharCode, StringFromCharCode) \ | 6862 V(String.prototype, charCodeAt, StringCharCodeAt) \ |
| 6863 V(Math, floor, MathFloor) \ | 6863 V(String.prototype, charAt, StringCharAt) \ |
| 6864 V(Math, round, MathRound) \ | 6864 V(String, fromCharCode, StringFromCharCode) \ |
| 6865 V(Math, ceil, MathCeil) \ | 6865 V(Math, floor, MathFloor) \ |
| 6866 V(Math, abs, MathAbs) \ | 6866 V(Math, round, MathRound) \ |
| 6867 V(Math, log, MathLog) \ | 6867 V(Math, ceil, MathCeil) \ |
| 6868 V(Math, exp, MathExp) \ | 6868 V(Math, abs, MathAbs) \ |
| 6869 V(Math, sqrt, MathSqrt) \ | 6869 V(Math, log, MathLog) \ |
| 6870 V(Math, pow, MathPow) \ | 6870 V(Math, exp, MathExp) \ |
| 6871 V(Math, max, MathMax) \ | 6871 V(Math, sqrt, MathSqrt) \ |
| 6872 V(Math, min, MathMin) \ | 6872 V(Math, pow, MathPow) \ |
| 6873 V(Math, max, MathMax) \ |
| 6874 V(Math, min, MathMin) \ |
| 6873 V(Math, imul, MathImul) | 6875 V(Math, imul, MathImul) |
| 6874 | 6876 |
| 6875 enum BuiltinFunctionId { | 6877 enum BuiltinFunctionId { |
| 6876 kArrayCode, | 6878 kArrayCode, |
| 6877 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 6879 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
| 6878 k##name, | 6880 k##name, |
| 6879 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 6881 FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) |
| 6880 #undef DECLARE_FUNCTION_ID | 6882 #undef DECLARE_FUNCTION_ID |
| 6881 // Fake id for a special case of Math.pow. Note, it continues the | 6883 // Fake id for a special case of Math.pow. Note, it continues the |
| 6882 // list of math functions. | 6884 // list of math functions. |
| (...skipping 4191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11074 } else { | 11076 } else { |
| 11075 value &= ~(1 << bit_position); | 11077 value &= ~(1 << bit_position); |
| 11076 } | 11078 } |
| 11077 return value; | 11079 return value; |
| 11078 } | 11080 } |
| 11079 }; | 11081 }; |
| 11080 | 11082 |
| 11081 } } // namespace v8::internal | 11083 } } // namespace v8::internal |
| 11082 | 11084 |
| 11083 #endif // V8_OBJECTS_H_ | 11085 #endif // V8_OBJECTS_H_ |
| OLD | NEW |