| 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 6833 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6844 | 6844 | 
| 6845 // List of builtin functions we want to identify to improve code | 6845 // List of builtin functions we want to identify to improve code | 
| 6846 // generation. | 6846 // generation. | 
| 6847 // | 6847 // | 
| 6848 // Each entry has a name of a global object property holding an object | 6848 // Each entry has a name of a global object property holding an object | 
| 6849 // optionally followed by ".prototype", a name of a builtin function | 6849 // optionally followed by ".prototype", a name of a builtin function | 
| 6850 // on the object (the one the id is set for), and a label. | 6850 // on the object (the one the id is set for), and a label. | 
| 6851 // | 6851 // | 
| 6852 // Installation of ids for the selected builtin functions is handled | 6852 // Installation of ids for the selected builtin functions is handled | 
| 6853 // by the bootstrapper. | 6853 // by the bootstrapper. | 
| 6854 #define FUNCTIONS_WITH_ID_LIST(V)                   \ | 6854 #define FUNCTIONS_WITH_ID_LIST(V)                     \ | 
| 6855   V(Array.prototype, push, ArrayPush)               \ | 6855   V(Array.prototype, indexOf, ArrayIndexOf)           \ | 
| 6856   V(Array.prototype, pop, ArrayPop)                 \ | 6856   V(Array.prototype, lastIndexOf, ArrayLastIndexOf)   \ | 
| 6857   V(Array.prototype, shift, ArrayShift)             \ | 6857   V(Array.prototype, push, ArrayPush)                 \ | 
| 6858   V(Function.prototype, apply, FunctionApply)       \ | 6858   V(Array.prototype, pop, ArrayPop)                   \ | 
| 6859   V(String.prototype, charCodeAt, StringCharCodeAt) \ | 6859   V(Array.prototype, shift, ArrayShift)               \ | 
| 6860   V(String.prototype, charAt, StringCharAt)         \ | 6860   V(Function.prototype, apply, FunctionApply)         \ | 
| 6861   V(String, fromCharCode, StringFromCharCode)       \ | 6861   V(String.prototype, charCodeAt, StringCharCodeAt)   \ | 
| 6862   V(Math, floor, MathFloor)                         \ | 6862   V(String.prototype, charAt, StringCharAt)           \ | 
| 6863   V(Math, round, MathRound)                         \ | 6863   V(String, fromCharCode, StringFromCharCode)         \ | 
| 6864   V(Math, ceil, MathCeil)                           \ | 6864   V(Math, floor, MathFloor)                           \ | 
| 6865   V(Math, abs, MathAbs)                             \ | 6865   V(Math, round, MathRound)                           \ | 
| 6866   V(Math, log, MathLog)                             \ | 6866   V(Math, ceil, MathCeil)                             \ | 
| 6867   V(Math, exp, MathExp)                             \ | 6867   V(Math, abs, MathAbs)                               \ | 
| 6868   V(Math, sqrt, MathSqrt)                           \ | 6868   V(Math, log, MathLog)                               \ | 
| 6869   V(Math, pow, MathPow)                             \ | 6869   V(Math, exp, MathExp)                               \ | 
| 6870   V(Math, max, MathMax)                             \ | 6870   V(Math, sqrt, MathSqrt)                             \ | 
| 6871   V(Math, min, MathMin)                             \ | 6871   V(Math, pow, MathPow)                               \ | 
|  | 6872   V(Math, max, MathMax)                               \ | 
|  | 6873   V(Math, min, MathMin)                               \ | 
| 6872   V(Math, imul, MathImul) | 6874   V(Math, imul, MathImul) | 
| 6873 | 6875 | 
| 6874 enum BuiltinFunctionId { | 6876 enum BuiltinFunctionId { | 
| 6875   kArrayCode, | 6877   kArrayCode, | 
| 6876 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name)    \ | 6878 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name)    \ | 
| 6877   k##name, | 6879   k##name, | 
| 6878   FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 6880   FUNCTIONS_WITH_ID_LIST(DECLARE_FUNCTION_ID) | 
| 6879 #undef DECLARE_FUNCTION_ID | 6881 #undef DECLARE_FUNCTION_ID | 
| 6880   // Fake id for a special case of Math.pow. Note, it continues the | 6882   // Fake id for a special case of Math.pow. Note, it continues the | 
| 6881   // list of math functions. | 6883   // list of math functions. | 
| (...skipping 4185 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 11067     } else { | 11069     } else { | 
| 11068       value &= ~(1 << bit_position); | 11070       value &= ~(1 << bit_position); | 
| 11069     } | 11071     } | 
| 11070     return value; | 11072     return value; | 
| 11071   } | 11073   } | 
| 11072 }; | 11074 }; | 
| 11073 | 11075 | 
| 11074 } }  // namespace v8::internal | 11076 } }  // namespace v8::internal | 
| 11075 | 11077 | 
| 11076 #endif  // V8_OBJECTS_H_ | 11078 #endif  // V8_OBJECTS_H_ | 
| OLD | NEW | 
|---|