| 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 | 9 |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 6544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6555 | 6555 |
| 6556 // List of builtin functions we want to identify to improve code | 6556 // List of builtin functions we want to identify to improve code |
| 6557 // generation. | 6557 // generation. |
| 6558 // | 6558 // |
| 6559 // Each entry has a name of a global object property holding an object | 6559 // Each entry has a name of a global object property holding an object |
| 6560 // optionally followed by ".prototype", a name of a builtin function | 6560 // optionally followed by ".prototype", a name of a builtin function |
| 6561 // on the object (the one the id is set for), and a label. | 6561 // on the object (the one the id is set for), and a label. |
| 6562 // | 6562 // |
| 6563 // Installation of ids for the selected builtin functions is handled | 6563 // Installation of ids for the selected builtin functions is handled |
| 6564 // by the bootstrapper. | 6564 // by the bootstrapper. |
| 6565 #define FUNCTIONS_WITH_ID_LIST(V) \ | 6565 #define FUNCTIONS_WITH_ID_LIST(V) \ |
| 6566 V(Array.prototype, indexOf, ArrayIndexOf) \ | 6566 V(Array.prototype, indexOf, ArrayIndexOf) \ |
| 6567 V(Array.prototype, lastIndexOf, ArrayLastIndexOf) \ | 6567 V(Array.prototype, lastIndexOf, ArrayLastIndexOf) \ |
| 6568 V(Array.prototype, push, ArrayPush) \ | 6568 V(Array.prototype, push, ArrayPush) \ |
| 6569 V(Array.prototype, pop, ArrayPop) \ | 6569 V(Array.prototype, pop, ArrayPop) \ |
| 6570 V(Array.prototype, shift, ArrayShift) \ | 6570 V(Array.prototype, shift, ArrayShift) \ |
| 6571 V(Function.prototype, apply, FunctionApply) \ | 6571 V(Function.prototype, apply, FunctionApply) \ |
| 6572 V(Function.prototype, call, FunctionCall) \ | 6572 V(Function.prototype, call, FunctionCall) \ |
| 6573 V(String.prototype, charCodeAt, StringCharCodeAt) \ | 6573 V(Object.prototype, hasOwnProperty, ObjectHasOwnProperty) \ |
| 6574 V(String.prototype, charAt, StringCharAt) \ | 6574 V(String.prototype, charCodeAt, StringCharCodeAt) \ |
| 6575 V(String.prototype, concat, StringConcat) \ | 6575 V(String.prototype, charAt, StringCharAt) \ |
| 6576 V(String.prototype, toLowerCase, StringToLowerCase) \ | 6576 V(String.prototype, concat, StringConcat) \ |
| 6577 V(String.prototype, toUpperCase, StringToUpperCase) \ | 6577 V(String.prototype, toLowerCase, StringToLowerCase) \ |
| 6578 V(String, fromCharCode, StringFromCharCode) \ | 6578 V(String.prototype, toUpperCase, StringToUpperCase) \ |
| 6579 V(Math, random, MathRandom) \ | 6579 V(String, fromCharCode, StringFromCharCode) \ |
| 6580 V(Math, floor, MathFloor) \ | 6580 V(Math, random, MathRandom) \ |
| 6581 V(Math, round, MathRound) \ | 6581 V(Math, floor, MathFloor) \ |
| 6582 V(Math, ceil, MathCeil) \ | 6582 V(Math, round, MathRound) \ |
| 6583 V(Math, abs, MathAbs) \ | 6583 V(Math, ceil, MathCeil) \ |
| 6584 V(Math, log, MathLog) \ | 6584 V(Math, abs, MathAbs) \ |
| 6585 V(Math, exp, MathExp) \ | 6585 V(Math, log, MathLog) \ |
| 6586 V(Math, sqrt, MathSqrt) \ | 6586 V(Math, exp, MathExp) \ |
| 6587 V(Math, pow, MathPow) \ | 6587 V(Math, sqrt, MathSqrt) \ |
| 6588 V(Math, max, MathMax) \ | 6588 V(Math, pow, MathPow) \ |
| 6589 V(Math, min, MathMin) \ | 6589 V(Math, max, MathMax) \ |
| 6590 V(Math, cos, MathCos) \ | 6590 V(Math, min, MathMin) \ |
| 6591 V(Math, sin, MathSin) \ | 6591 V(Math, cos, MathCos) \ |
| 6592 V(Math, tan, MathTan) \ | 6592 V(Math, sin, MathSin) \ |
| 6593 V(Math, acos, MathAcos) \ | 6593 V(Math, tan, MathTan) \ |
| 6594 V(Math, asin, MathAsin) \ | 6594 V(Math, acos, MathAcos) \ |
| 6595 V(Math, atan, MathAtan) \ | 6595 V(Math, asin, MathAsin) \ |
| 6596 V(Math, atan2, MathAtan2) \ | 6596 V(Math, atan, MathAtan) \ |
| 6597 V(Math, imul, MathImul) \ | 6597 V(Math, atan2, MathAtan2) \ |
| 6598 V(Math, clz32, MathClz32) \ | 6598 V(Math, imul, MathImul) \ |
| 6599 V(Math, clz32, MathClz32) \ |
| 6599 V(Math, fround, MathFround) | 6600 V(Math, fround, MathFround) |
| 6600 | 6601 |
| 6601 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ | 6602 #define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \ |
| 6602 V(Atomics, load, AtomicsLoad) \ | 6603 V(Atomics, load, AtomicsLoad) \ |
| 6603 V(Atomics, store, AtomicsStore) | 6604 V(Atomics, store, AtomicsStore) |
| 6604 | 6605 |
| 6605 enum BuiltinFunctionId { | 6606 enum BuiltinFunctionId { |
| 6606 kArrayCode, | 6607 kArrayCode, |
| 6607 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ | 6608 #define DECLARE_FUNCTION_ID(ignored1, ignore2, name) \ |
| 6608 k##name, | 6609 k##name, |
| (...skipping 4269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10878 } | 10879 } |
| 10879 return value; | 10880 return value; |
| 10880 } | 10881 } |
| 10881 }; | 10882 }; |
| 10882 | 10883 |
| 10883 | 10884 |
| 10884 } // NOLINT, false-positive due to second-order macros. | 10885 } // NOLINT, false-positive due to second-order macros. |
| 10885 } // NOLINT, false-positive due to second-order macros. | 10886 } // NOLINT, false-positive due to second-order macros. |
| 10886 | 10887 |
| 10887 #endif // V8_OBJECTS_H_ | 10888 #endif // V8_OBJECTS_H_ |
| OLD | NEW |