OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 | 1881 |
1882 Handle<JSFunction> promise_catch = SimpleInstallFunction( | 1882 Handle<JSFunction> promise_catch = SimpleInstallFunction( |
1883 prototype, "catch", Builtins::kPromiseCatch, 1, true, DONT_ENUM); | 1883 prototype, "catch", Builtins::kPromiseCatch, 1, true, DONT_ENUM); |
1884 InstallWithIntrinsicDefaultProto(isolate, promise_catch, | 1884 InstallWithIntrinsicDefaultProto(isolate, promise_catch, |
1885 Context::PROMISE_CATCH_INDEX); | 1885 Context::PROMISE_CATCH_INDEX); |
1886 | 1886 |
1887 SimpleInstallGetter(promise_fun, factory->symbol_species_string(), | 1887 SimpleInstallGetter(promise_fun, factory->symbol_species_string(), |
1888 factory->species_symbol(), Builtins::kReturnReceiver, | 1888 factory->species_symbol(), Builtins::kReturnReceiver, |
1889 true); | 1889 true); |
1890 | 1890 |
| 1891 SimpleInstallFunction(promise_fun, "resolve", Builtins::kPromiseResolve, 1, |
| 1892 true, DONT_ENUM); |
| 1893 |
1891 Handle<Map> prototype_map(prototype->map()); | 1894 Handle<Map> prototype_map(prototype->map()); |
1892 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate); | 1895 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate); |
1893 | 1896 |
1894 // Store the initial Promise.prototype map. This is used in fast-path | 1897 // Store the initial Promise.prototype map. This is used in fast-path |
1895 // checks. Do not alter the prototype after this point. | 1898 // checks. Do not alter the prototype after this point. |
1896 native_context()->set_promise_prototype_map(*prototype_map); | 1899 native_context()->set_promise_prototype_map(*prototype_map); |
1897 | 1900 |
1898 { // Internal: PromiseInternalConstructor | 1901 { // Internal: PromiseInternalConstructor |
1899 Handle<JSFunction> function = | 1902 Handle<JSFunction> function = |
1900 SimpleCreateFunction(isolate, factory->empty_string(), | 1903 SimpleCreateFunction(isolate, factory->empty_string(), |
(...skipping 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4727 } | 4730 } |
4728 | 4731 |
4729 | 4732 |
4730 // Called when the top-level V8 mutex is destroyed. | 4733 // Called when the top-level V8 mutex is destroyed. |
4731 void Bootstrapper::FreeThreadResources() { | 4734 void Bootstrapper::FreeThreadResources() { |
4732 DCHECK(!IsActive()); | 4735 DCHECK(!IsActive()); |
4733 } | 4736 } |
4734 | 4737 |
4735 } // namespace internal | 4738 } // namespace internal |
4736 } // namespace v8 | 4739 } // namespace v8 |
OLD | NEW |