| 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 (function(global, utils) { | 5 (function(global, utils) { |
| 6 | 6 |
| 7 %CheckIsBootstrapping(); | 7 %CheckIsBootstrapping(); |
| 8 | 8 |
| 9 // ---------------------------------------------------------------------------- | 9 // ---------------------------------------------------------------------------- |
| 10 // Imports | 10 // Imports |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 } | 765 } |
| 766 | 766 |
| 767 if (IS_RECEIVER(obj)) { | 767 if (IS_RECEIVER(obj)) { |
| 768 %SetPrototype(obj, proto); | 768 %SetPrototype(obj, proto); |
| 769 } | 769 } |
| 770 | 770 |
| 771 return obj; | 771 return obj; |
| 772 } | 772 } |
| 773 | 773 |
| 774 | 774 |
| 775 // ES6 section 19.1.2.6 |
| 776 function ObjectGetOwnPropertyDescriptor(obj, p) { |
| 777 return %GetOwnProperty(obj, p); |
| 778 } |
| 779 |
| 780 |
| 775 // ES5 section 15.2.3.4. | 781 // ES5 section 15.2.3.4. |
| 776 function ObjectGetOwnPropertyNames(obj) { | 782 function ObjectGetOwnPropertyNames(obj) { |
| 777 obj = TO_OBJECT(obj); | 783 obj = TO_OBJECT(obj); |
| 778 return %GetOwnPropertyKeys(obj, PROPERTY_FILTER_SKIP_SYMBOLS); | 784 return %GetOwnPropertyKeys(obj, PROPERTY_FILTER_SKIP_SYMBOLS); |
| 779 } | 785 } |
| 780 | 786 |
| 781 | 787 |
| 782 // ES5 section 15.2.3.6. | 788 // ES5 section 15.2.3.6. |
| 783 function ObjectDefineProperty(obj, p, attributes) { | 789 function ObjectDefineProperty(obj, p, attributes) { |
| 784 // The new pure-C++ implementation doesn't support O.o. | 790 // The new pure-C++ implementation doesn't support O.o. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 ObjectSetProto); | 882 ObjectSetProto); |
| 877 | 883 |
| 878 // Set up non-enumerable functions in the Object object. | 884 // Set up non-enumerable functions in the Object object. |
| 879 utils.InstallFunctions(GlobalObject, DONT_ENUM, [ | 885 utils.InstallFunctions(GlobalObject, DONT_ENUM, [ |
| 880 // assign is added in bootstrapper.cc. | 886 // assign is added in bootstrapper.cc. |
| 881 // keys is added in bootstrapper.cc. | 887 // keys is added in bootstrapper.cc. |
| 882 "defineProperty", ObjectDefineProperty, | 888 "defineProperty", ObjectDefineProperty, |
| 883 "defineProperties", ObjectDefineProperties, | 889 "defineProperties", ObjectDefineProperties, |
| 884 "getPrototypeOf", ObjectGetPrototypeOf, | 890 "getPrototypeOf", ObjectGetPrototypeOf, |
| 885 "setPrototypeOf", ObjectSetPrototypeOf, | 891 "setPrototypeOf", ObjectSetPrototypeOf, |
| 892 "getOwnPropertyDescriptor", ObjectGetOwnPropertyDescriptor, |
| 886 "getOwnPropertyNames", ObjectGetOwnPropertyNames, | 893 "getOwnPropertyNames", ObjectGetOwnPropertyNames, |
| 887 // getOwnPropertySymbols is added in symbol.js. | 894 // getOwnPropertySymbols is added in symbol.js. |
| 888 "is", SameValue, // ECMA-262, Edition 6, section 19.1.2.10 | 895 "is", SameValue, // ECMA-262, Edition 6, section 19.1.2.10 |
| 889 // deliverChangeRecords, getNotifier, observe and unobserve are added | 896 // deliverChangeRecords, getNotifier, observe and unobserve are added |
| 890 // in object-observe.js. | 897 // in object-observe.js. |
| 891 ]); | 898 ]); |
| 892 | 899 |
| 893 | 900 |
| 894 // ---------------------------------------------------------------------------- | 901 // ---------------------------------------------------------------------------- |
| 895 // Boolean | 902 // Boolean |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 to.ObjectDefineProperties = ObjectDefineProperties; | 1181 to.ObjectDefineProperties = ObjectDefineProperties; |
| 1175 to.ObjectDefineProperty = ObjectDefineProperty; | 1182 to.ObjectDefineProperty = ObjectDefineProperty; |
| 1176 to.ObjectHasOwnProperty = ObjectHasOwnProperty; | 1183 to.ObjectHasOwnProperty = ObjectHasOwnProperty; |
| 1177 }); | 1184 }); |
| 1178 | 1185 |
| 1179 %InstallToContext([ | 1186 %InstallToContext([ |
| 1180 "object_value_of", ObjectValueOf, | 1187 "object_value_of", ObjectValueOf, |
| 1181 ]); | 1188 ]); |
| 1182 | 1189 |
| 1183 }) | 1190 }) |
| OLD | NEW |