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

Side by Side Diff: src/bootstrapper.cc

Issue 1990803005: [runtime] set AsyncFunctionNext/Throw to adapt arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | test/mjsunit/harmony/async-debug-basic.js » ('j') | no next file with comments »
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/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/extensions/externalize-string-extension.h" 10 #include "src/extensions/externalize-string-extension.h"
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 JSFunction::SetPrototype(async_function_constructor, 2464 JSFunction::SetPrototype(async_function_constructor,
2465 async_function_prototype); 2465 async_function_prototype);
2466 2466
2467 Handle<JSFunction> async_function_next = 2467 Handle<JSFunction> async_function_next =
2468 SimpleInstallFunction(container, "AsyncFunctionNext", 2468 SimpleInstallFunction(container, "AsyncFunctionNext",
2469 Builtins::kGeneratorPrototypeNext, 2, false); 2469 Builtins::kGeneratorPrototypeNext, 2, false);
2470 Handle<JSFunction> async_function_throw = 2470 Handle<JSFunction> async_function_throw =
2471 SimpleInstallFunction(container, "AsyncFunctionThrow", 2471 SimpleInstallFunction(container, "AsyncFunctionThrow",
2472 Builtins::kGeneratorPrototypeThrow, 2, false); 2472 Builtins::kGeneratorPrototypeThrow, 2, false);
2473 async_function_next->shared()->set_native(true); 2473 async_function_next->shared()->set_native(true);
2474 async_function_next->shared()->set_internal_formal_parameter_count(1);
caitp (gmail) 2016/05/18 14:38:23 question: why do we not set internal_formal_parame
caitp (gmail) 2016/05/18 18:21:13 It may be a more general / better solution to hand
2474 async_function_throw->shared()->set_native(true); 2475 async_function_throw->shared()->set_native(true);
2476 async_function_throw->shared()->set_internal_formal_parameter_count(1);
2475 } 2477 }
2476 } 2478 }
2477 } 2479 }
2478 2480
2479 2481
2480 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, 2482 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate,
2481 Handle<JSObject> container) { 2483 Handle<JSObject> container) {
2482 HandleScope scope(isolate); 2484 HandleScope scope(isolate);
2483 2485
2484 #define INITIALIZE_FLAG(FLAG) \ 2486 #define INITIALIZE_FLAG(FLAG) \
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
3776 } 3778 }
3777 3779
3778 3780
3779 // Called when the top-level V8 mutex is destroyed. 3781 // Called when the top-level V8 mutex is destroyed.
3780 void Bootstrapper::FreeThreadResources() { 3782 void Bootstrapper::FreeThreadResources() {
3781 DCHECK(!IsActive()); 3783 DCHECK(!IsActive());
3782 } 3784 }
3783 3785
3784 } // namespace internal 3786 } // namespace internal
3785 } // namespace v8 3787 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/async-debug-basic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698