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

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: Rework to support all functions without arguments adapter frames 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 | src/frames.cc » ('j') | src/frames.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/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 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 JSObject::AddProperty( 2459 JSObject::AddProperty(
2460 async_function_prototype, factory->constructor_string(), 2460 async_function_prototype, factory->constructor_string(),
2461 async_function_constructor, 2461 async_function_constructor,
2462 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); 2462 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY));
2463 2463
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, 1, false);
Dan Ehrenberg 2016/05/18 18:58:02 1 looks like the right value here, matching the ot
caitp (gmail) 2016/05/18 19:03:43 The original implementation used a parameter for t
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, 1, false);
2473 async_function_next->shared()->set_native(true); 2473 async_function_next->shared()->set_native(true);
2474 async_function_throw->shared()->set_native(true); 2474 async_function_throw->shared()->set_native(true);
2475 } 2475 }
2476 } 2476 }
2477 } 2477 }
2478 2478
2479 2479
2480 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, 2480 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate,
2481 Handle<JSObject> container) { 2481 Handle<JSObject> container) {
2482 HandleScope scope(isolate); 2482 HandleScope scope(isolate);
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3776 } 3776 }
3777 3777
3778 3778
3779 // Called when the top-level V8 mutex is destroyed. 3779 // Called when the top-level V8 mutex is destroyed.
3780 void Bootstrapper::FreeThreadResources() { 3780 void Bootstrapper::FreeThreadResources() {
3781 DCHECK(!IsActive()); 3781 DCHECK(!IsActive());
3782 } 3782 }
3783 3783
3784 } // namespace internal 3784 } // namespace internal
3785 } // namespace v8 3785 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/frames.cc » ('j') | src/frames.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698