OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 } | 1349 } |
1350 } | 1350 } |
1351 | 1351 |
1352 | 1352 |
1353 // ---------------------------------------------------------------------------- | 1353 // ---------------------------------------------------------------------------- |
1354 // Object | 1354 // Object |
1355 | 1355 |
1356 function SetUpObject() { | 1356 function SetUpObject() { |
1357 %CheckIsBootstrapping(); | 1357 %CheckIsBootstrapping(); |
1358 | 1358 |
| 1359 %SetNativeFlag($Object); |
1359 %SetCode($Object, ObjectConstructor); | 1360 %SetCode($Object, ObjectConstructor); |
1360 %FunctionSetName(ObjectPoisonProto, "__proto__"); | 1361 %FunctionSetName(ObjectPoisonProto, "__proto__"); |
1361 %FunctionRemovePrototype(ObjectPoisonProto); | 1362 %FunctionRemovePrototype(ObjectPoisonProto); |
1362 %SetExpectedNumberOfProperties($Object, 4); | 1363 %SetExpectedNumberOfProperties($Object, 4); |
1363 | 1364 |
1364 %SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM); | 1365 %SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM); |
1365 | 1366 |
1366 // Set up non-enumerable functions on the Object.prototype object. | 1367 // Set up non-enumerable functions on the Object.prototype object. |
1367 InstallFunctions($Object.prototype, DONT_ENUM, $Array( | 1368 InstallFunctions($Object.prototype, DONT_ENUM, $Array( |
1368 "toString", ObjectToString, | 1369 "toString", ObjectToString, |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 %SetCode($Function, NewFunction); | 1792 %SetCode($Function, NewFunction); |
1792 %SetProperty($Function.prototype, "constructor", $Function, DONT_ENUM); | 1793 %SetProperty($Function.prototype, "constructor", $Function, DONT_ENUM); |
1793 | 1794 |
1794 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1795 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
1795 "bind", FunctionBind, | 1796 "bind", FunctionBind, |
1796 "toString", FunctionToString | 1797 "toString", FunctionToString |
1797 )); | 1798 )); |
1798 } | 1799 } |
1799 | 1800 |
1800 SetUpFunction(); | 1801 SetUpFunction(); |
OLD | NEW |