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 // This file relies on the fact that the following declarations have been made | 5 // This file relies on the fact that the following declarations have been made |
6 // in runtime.js: | 6 // in runtime.js: |
7 // var $Object = global.Object; | 7 // var $Object = global.Object; |
8 // var $Boolean = global.Boolean; | 8 // var $Boolean = global.Boolean; |
9 // var $Number = global.Number; | 9 // var $Number = global.Number; |
10 // var $Function = global.Function; | 10 // var $Function = global.Function; |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 | 1389 |
1390 | 1390 |
1391 // ---------------------------------------------------------------------------- | 1391 // ---------------------------------------------------------------------------- |
1392 // Object | 1392 // Object |
1393 | 1393 |
1394 function SetUpObject() { | 1394 function SetUpObject() { |
1395 %CheckIsBootstrapping(); | 1395 %CheckIsBootstrapping(); |
1396 | 1396 |
1397 %SetNativeFlag($Object); | 1397 %SetNativeFlag($Object); |
1398 %SetCode($Object, ObjectConstructor); | 1398 %SetCode($Object, ObjectConstructor); |
1399 %SetExpectedNumberOfProperties($Object, 4); | |
1400 | 1399 |
1401 %SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM); | 1400 %SetProperty($Object.prototype, "constructor", $Object, DONT_ENUM); |
1402 | 1401 |
1403 // Set up non-enumerable functions on the Object.prototype object. | 1402 // Set up non-enumerable functions on the Object.prototype object. |
1404 InstallFunctions($Object.prototype, DONT_ENUM, $Array( | 1403 InstallFunctions($Object.prototype, DONT_ENUM, $Array( |
1405 "toString", ObjectToString, | 1404 "toString", ObjectToString, |
1406 "toLocaleString", ObjectToLocaleString, | 1405 "toLocaleString", ObjectToLocaleString, |
1407 "valueOf", ObjectValueOf, | 1406 "valueOf", ObjectValueOf, |
1408 "hasOwnProperty", ObjectHasOwnProperty, | 1407 "hasOwnProperty", ObjectHasOwnProperty, |
1409 "isPrototypeOf", ObjectIsPrototypeOf, | 1408 "isPrototypeOf", ObjectIsPrototypeOf, |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1886 } | 1885 } |
1887 | 1886 |
1888 function EnqueueMicrotask(fn) { | 1887 function EnqueueMicrotask(fn) { |
1889 var microtaskState = %GetMicrotaskState(); | 1888 var microtaskState = %GetMicrotaskState(); |
1890 if (IS_UNDEFINED(microtaskState.queue) || IS_NULL(microtaskState.queue)) { | 1889 if (IS_UNDEFINED(microtaskState.queue) || IS_NULL(microtaskState.queue)) { |
1891 microtaskState.queue = new InternalArray; | 1890 microtaskState.queue = new InternalArray; |
1892 } | 1891 } |
1893 microtaskState.queue.push(fn); | 1892 microtaskState.queue.push(fn); |
1894 %SetMicrotaskPending(true); | 1893 %SetMicrotaskPending(true); |
1895 } | 1894 } |
OLD | NEW |