Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: src/bootstrapper.cc

Issue 2592933004: [promises] Move Promise.resolve to TF (Closed)
Patch Set: throw correct typerror Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | src/builtins/builtins-promise.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 1879
1880 Handle<JSFunction> promise_catch = SimpleInstallFunction( 1880 Handle<JSFunction> promise_catch = SimpleInstallFunction(
1881 prototype, "catch", Builtins::kPromiseCatch, 1, true, DONT_ENUM); 1881 prototype, "catch", Builtins::kPromiseCatch, 1, true, DONT_ENUM);
1882 InstallWithIntrinsicDefaultProto(isolate, promise_catch, 1882 InstallWithIntrinsicDefaultProto(isolate, promise_catch,
1883 Context::PROMISE_CATCH_INDEX); 1883 Context::PROMISE_CATCH_INDEX);
1884 1884
1885 SimpleInstallGetter(promise_fun, factory->symbol_species_string(), 1885 SimpleInstallGetter(promise_fun, factory->symbol_species_string(),
1886 factory->species_symbol(), Builtins::kReturnReceiver, 1886 factory->species_symbol(), Builtins::kReturnReceiver,
1887 true); 1887 true);
1888 1888
1889 SimpleInstallFunction(promise_fun, "resolve", Builtins::kPromiseResolve, 1,
1890 true, DONT_ENUM);
1891
1889 Handle<Map> prototype_map(prototype->map()); 1892 Handle<Map> prototype_map(prototype->map());
1890 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate); 1893 Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate);
1891 1894
1892 // Store the initial Promise.prototype map. This is used in fast-path 1895 // Store the initial Promise.prototype map. This is used in fast-path
1893 // checks. Do not alter the prototype after this point. 1896 // checks. Do not alter the prototype after this point.
1894 native_context()->set_promise_prototype_map(*prototype_map); 1897 native_context()->set_promise_prototype_map(*prototype_map);
1895 1898
1896 { // Internal: PromiseInternalConstructor 1899 { // Internal: PromiseInternalConstructor
1897 Handle<JSFunction> function = 1900 Handle<JSFunction> function =
1898 SimpleCreateFunction(isolate, factory->empty_string(), 1901 SimpleCreateFunction(isolate, factory->empty_string(),
(...skipping 2766 matching lines...) Expand 10 before | Expand all | Expand 10 after
4665 } 4668 }
4666 4669
4667 4670
4668 // Called when the top-level V8 mutex is destroyed. 4671 // Called when the top-level V8 mutex is destroyed.
4669 void Bootstrapper::FreeThreadResources() { 4672 void Bootstrapper::FreeThreadResources() {
4670 DCHECK(!IsActive()); 4673 DCHECK(!IsActive());
4671 } 4674 }
4672 4675
4673 } // namespace internal 4676 } // namespace internal
4674 } // namespace v8 4677 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | src/builtins/builtins-promise.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698