Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <iosfwd> | 8 #include <iosfwd> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 6984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6995 | 6995 |
| 6996 // List of builtin functions we want to identify to improve code | 6996 // List of builtin functions we want to identify to improve code |
| 6997 // generation. | 6997 // generation. |
| 6998 // | 6998 // |
| 6999 // Each entry has a name of a global object property holding an object | 6999 // Each entry has a name of a global object property holding an object |
| 7000 // optionally followed by ".prototype", a name of a builtin function | 7000 // optionally followed by ".prototype", a name of a builtin function |
| 7001 // on the object (the one the id is set for), and a label. | 7001 // on the object (the one the id is set for), and a label. |
| 7002 // | 7002 // |
| 7003 // Installation of ids for the selected builtin functions is handled | 7003 // Installation of ids for the selected builtin functions is handled |
| 7004 // by the bootstrapper. | 7004 // by the bootstrapper. |
| 7005 #define FUNCTIONS_WITH_ID_LIST(V) \ | 7005 #define FUNCTIONS_WITH_ID_LIST(V) \ |
| 7006 V(Array.prototype, indexOf, ArrayIndexOf) \ | 7006 V(Array.prototype, indexOf, ArrayIndexOf) \ |
| 7007 V(Array.prototype, lastIndexOf, ArrayLastIndexOf) \ | 7007 V(Array.prototype, lastIndexOf, ArrayLastIndexOf) \ |
| 7008 V(Array.prototype, push, ArrayPush) \ | 7008 V(Array.prototype, push, ArrayPush) \ |
| 7009 V(Array.prototype, pop, ArrayPop) \ | 7009 V(Array.prototype, pop, ArrayPop) \ |
| 7010 V(Array.prototype, shift, ArrayShift) \ | 7010 V(Array.prototype, shift, ArrayShift) \ |
| 7011 V(Date.prototype, getDate, DateGetDate) \ | 7011 V(Date.prototype, getDate, DateGetDate) \ |
| 7012 V(Date.prototype, getDay, DateGetDay) \ | 7012 V(Date.prototype, getDay, DateGetDay) \ |
| 7013 V(Date.prototype, getFullYear, DateGetFullYear) \ | 7013 V(Date.prototype, getFullYear, DateGetFullYear) \ |
| 7014 V(Date.prototype, getHours, DateGetHours) \ | 7014 V(Date.prototype, getHours, DateGetHours) \ |
| 7015 V(Date.prototype, getMilliseconds, DateGetMilliseconds) \ | 7015 V(Date.prototype, getMilliseconds, DateGetMilliseconds) \ |
| 7016 V(Date.prototype, getMinutes, DateGetMinutes) \ | 7016 V(Date.prototype, getMinutes, DateGetMinutes) \ |
| 7017 V(Date.prototype, getMonth, DateGetMonth) \ | 7017 V(Date.prototype, getMonth, DateGetMonth) \ |
| 7018 V(Date.prototype, getSeconds, DateGetSeconds) \ | 7018 V(Date.prototype, getSeconds, DateGetSeconds) \ |
| 7019 V(Date.prototype, getTime, DateGetTime) \ | 7019 V(Date.prototype, getTime, DateGetTime) \ |
| 7020 V(Function.prototype, apply, FunctionApply) \ | 7020 V(Function.prototype, apply, FunctionApply) \ |
| 7021 V(Function.prototype, call, FunctionCall) \ | 7021 V(Function.prototype, call, FunctionCall) \ |
| 7022 V(Object.prototype, hasOwnProperty, ObjectHasOwnProperty) \ | 7022 V(Object.prototype, hasOwnProperty, ObjectHasOwnProperty) \ |
| 7023 V(String.prototype, charCodeAt, StringCharCodeAt) \ | 7023 V(String.prototype, charCodeAt, StringCharCodeAt) \ |
| 7024 V(String.prototype, charAt, StringCharAt) \ | 7024 V(String.prototype, charAt, StringCharAt) \ |
| 7025 V(String.prototype, concat, StringConcat) \ | 7025 V(String.prototype, concat, StringConcat) \ |
| 7026 V(String.prototype, substr, StringSubstr) \ | 7026 V(String.prototype, substr, StringSubstr) \ |
| 7027 V(String.prototype, toLowerCase, StringToLowerCase) \ | 7027 V(String.prototype, toLowerCase, StringToLowerCase) \ |
| 7028 V(String.prototype, toUpperCase, StringToUpperCase) \ | 7028 V(String.prototype, toUpperCase, StringToUpperCase) \ |
| 7029 V(String, fromCharCode, StringFromCharCode) \ | 7029 V(% StringIteratorPrototype %, next, StringIteratorPrototypeNext) \ |
|
Benedikt Meurer
2016/09/29 13:04:27
Don't add it here, but to the special list below a
| |
| 7030 V(Math, random, MathRandom) \ | 7030 V(String, fromCharCode, StringFromCharCode) \ |
| 7031 V(Math, floor, MathFloor) \ | 7031 V(Math, random, MathRandom) \ |
| 7032 V(Math, round, MathRound) \ | 7032 V(Math, floor, MathFloor) \ |
| 7033 V(Math, ceil, MathCeil) \ | 7033 V(Math, round, MathRound) \ |
| 7034 V(Math, abs, MathAbs) \ | 7034 V(Math, ceil, MathCeil) \ |
| 7035 V(Math, log, MathLog) \ | 7035 V(Math, abs, MathAbs) \ |
| 7036 V(Math, log1p, MathLog1p) \ | 7036 V(Math, log, MathLog) \ |
| 7037 V(Math, log2, MathLog2) \ | 7037 V(Math, log1p, MathLog1p) \ |
| 7038 V(Math, log10, MathLog10) \ | 7038 V(Math, log2, MathLog2) \ |
| 7039 V(Math, cbrt, MathCbrt) \ | 7039 V(Math, log10, MathLog10) \ |
| 7040 V(Math, exp, MathExp) \ | 7040 V(Math, cbrt, MathCbrt) \ |
| 7041 V(Math, expm1, MathExpm1) \ | 7041 V(Math, exp, MathExp) \ |
| 7042 V(Math, sqrt, MathSqrt) \ | 7042 V(Math, expm1, MathExpm1) \ |
| 7043 V(Math, pow, MathPow) \ | 7043 V(Math, sqrt, MathSqrt) \ |
| 7044 V(Math, max, MathMax) \ | 7044 V(Math, pow, MathPow) \ |
| 7045 V(Math, min, MathMin) \ | 7045 V(Math, max, MathMax) \ |
| 7046 V(Math, cos, MathCos) \ | 7046 V(Math, min, MathMin) \ |
| 7047 V(Math, cosh, MathCosh) \ | 7047 V(Math, cos, MathCos) \ |
| 7048 V(Math, sign, MathSign) \ | 7048 V(Math, cosh, MathCosh) \ |
| 7049 V(Math, sin, MathSin) \ | 7049 V(Math, sign, MathSign) \ |
| 7050 V(Math, sinh, MathSinh) \ | 7050 V(Math, sin, MathSin) \ |
| 7051 V(Math, tan, MathTan) \ | 7051 V(Math, sinh, MathSinh) \ |
| 7052 V(Math, tanh, MathTanh) \ | 7052 V(Math, tan, MathTan) \ |
| 7053 V(Math, acos, MathAcos) \ | 7053 V(Math, tanh, MathTanh) \ |
| 7054 V(Math, acosh, MathAcosh) \ | 7054 V(Math, acos, MathAcos) \ |
| 7055 V(Math, asin, MathAsin) \ | 7055 V(Math, acosh, MathAcosh) \ |
| 7056 V(Math, asinh, MathAsinh) \ | 7056 V(Math, asin, MathAsin) \ |
| 7057 V(Math, atan, MathAtan) \ | 7057 V(Math, asinh, MathAsinh) \ |
| 7058 V(Math, atan2, MathAtan2) \ | 7058 V(Math, atan, MathAtan) \ |
| 7059 V(Math, atanh, MathAtanh) \ | 7059 V(Math, atan2, MathAtan2) \ |
| 7060 V(Math, imul, MathImul) \ | 7060 V(Math, atanh, MathAtanh) \ |
| 7061 V(Math, clz32, MathClz32) \ | 7061 V(Math, imul, MathImul) \ |
| 7062 V(Math, fround, MathFround) \ | 7062 V(Math, clz32, MathClz32) \ |
| 7063 V(Math, trunc, MathTrunc) \ | 7063 V(Math, fround, MathFround) \ |
| 7064 V(Number, isFinite, NumberIsFinite) \ | 7064 V(Math, trunc, MathTrunc) \ |
| 7065 V(Number, isInteger, NumberIsInteger) \ | 7065 V(Number, isFinite, NumberIsFinite) \ |
| 7066 V(Number, isNaN, NumberIsNaN) \ | 7066 V(Number, isInteger, NumberIsInteger) \ |
| 7067 V(Number, isSafeInteger, NumberIsSafeInteger) \ | 7067 V(Number, isNaN, NumberIsNaN) \ |
| 7068 V(Number, parseInt, NumberParseInt) \ | 7068 V(Number, isSafeInteger, NumberIsSafeInteger) \ |
| 7069 V(Number, parseInt, NumberParseInt) \ | |
| 7069 V(Number.prototype, toString, NumberToString) | 7070 V(Number.prototype, toString, NumberToString) |
| 7070 | 7071 |
| 7071 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ | 7072 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ |
| 7072 V(Atomics, load, AtomicsLoad) \ | 7073 V(Atomics, load, AtomicsLoad) \ |
| 7073 V(Atomics, store, AtomicsStore) | 7074 V(Atomics, store, AtomicsStore) |
| 7074 | 7075 |
| 7075 enum BuiltinFunctionId { | 7076 enum BuiltinFunctionId { |
| 7076 kArrayCode, | 7077 kArrayCode, |
| 7077 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 7078 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
| 7078 k##name, | 7079 k##name, |
| (...skipping 4370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11449 } | 11450 } |
| 11450 return value; | 11451 return value; |
| 11451 } | 11452 } |
| 11452 }; | 11453 }; |
| 11453 | 11454 |
| 11454 | 11455 |
| 11455 } // NOLINT, false-positive due to second-order macros. | 11456 } // NOLINT, false-positive due to second-order macros. |
| 11456 } // NOLINT, false-positive due to second-order macros. | 11457 } // NOLINT, false-positive due to second-order macros. |
| 11457 | 11458 |
| 11458 #endif // V8_OBJECTS_H_ | 11459 #endif // V8_OBJECTS_H_ |
| OLD | NEW |