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

Side by Side Diff: src/bootstrapper.cc

Issue 2638073002: [async-await] Move PromiseCreate and PromiseRelease to TF (Closed)
Patch Set: Rebase Created 3 years, 11 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
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 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 async_function_prototype); 3378 async_function_prototype);
3379 3379
3380 Handle<JSFunction> async_function_next = 3380 Handle<JSFunction> async_function_next =
3381 SimpleInstallFunction(container, "AsyncFunctionNext", 3381 SimpleInstallFunction(container, "AsyncFunctionNext",
3382 Builtins::kGeneratorPrototypeNext, 1, true); 3382 Builtins::kGeneratorPrototypeNext, 1, true);
3383 Handle<JSFunction> async_function_throw = 3383 Handle<JSFunction> async_function_throw =
3384 SimpleInstallFunction(container, "AsyncFunctionThrow", 3384 SimpleInstallFunction(container, "AsyncFunctionThrow",
3385 Builtins::kGeneratorPrototypeThrow, 1, true); 3385 Builtins::kGeneratorPrototypeThrow, 1, true);
3386 async_function_next->shared()->set_native(false); 3386 async_function_next->shared()->set_native(false);
3387 async_function_throw->shared()->set_native(false); 3387 async_function_throw->shared()->set_native(false);
3388
3389 {
3390 Handle<JSFunction> function = SimpleCreateFunction(
3391 isolate, factory->empty_string(),
3392 Builtins::kAsyncFunctionPromiseCreate, 0, false);
3393 InstallWithIntrinsicDefaultProto(
3394 isolate, function, Context::ASYNC_FUNCTION_PROMISE_CREATE_INDEX);
3395 }
3396
3397 {
3398 Handle<JSFunction> function = SimpleCreateFunction(
3399 isolate, factory->empty_string(),
3400 Builtins::kAsyncFunctionPromiseRelease, 1, false);
3401 InstallWithIntrinsicDefaultProto(
3402 isolate, function, Context::ASYNC_FUNCTION_PROMISE_RELEASE_INDEX);
3403 }
3388 } 3404 }
3389 } 3405 }
3390 3406
3391 { // -- C a l l S i t e 3407 { // -- C a l l S i t e
3392 // Builtin functions for CallSite. 3408 // Builtin functions for CallSite.
3393 3409
3394 // CallSites are a special case; the constructor is for our private use 3410 // CallSites are a special case; the constructor is for our private use
3395 // only, therefore we set it up as a builtin that throws. Internally, we use 3411 // only, therefore we set it up as a builtin that throws. Internally, we use
3396 // CallSiteUtils::Construct to create CallSite objects. 3412 // CallSiteUtils::Construct to create CallSite objects.
3397 3413
(...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
4798 } 4814 }
4799 4815
4800 4816
4801 // Called when the top-level V8 mutex is destroyed. 4817 // Called when the top-level V8 mutex is destroyed.
4802 void Bootstrapper::FreeThreadResources() { 4818 void Bootstrapper::FreeThreadResources() {
4803 DCHECK(!IsActive()); 4819 DCHECK(!IsActive());
4804 } 4820 }
4805 4821
4806 } // namespace internal 4822 } // namespace internal
4807 } // namespace v8 4823 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins.h » ('j') | src/builtins/builtins-async-await.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698