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

Unified Diff: src/runtime/runtime-generator.cc

Issue 1648773003: [generators] Remove full-codegen implementation of yield*. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@yield-star-with-return
Patch Set: Rebase Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-generator.cc
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc
index f1b2fd055d94b07d397dcf5d6e94c236fd155731..dab0621592efffc37d655b13da0012efcd2f3a2d 100644
--- a/src/runtime/runtime-generator.cc
+++ b/src/runtime/runtime-generator.cc
@@ -36,7 +36,7 @@ RUNTIME_FUNCTION(Runtime_CreateJSGeneratorObject) {
RUNTIME_FUNCTION(Runtime_SuspendJSGeneratorObject) {
HandleScope handle_scope(isolate);
- DCHECK(args.length() == 1 || args.length() == 2);
+ DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator_object, 0);
JavaScriptFrameIterator stack_iterator(isolate);
@@ -55,18 +55,6 @@ RUNTIME_FUNCTION(Runtime_SuspendJSGeneratorObject) {
DCHECK_GE(operands_count, 1 + args.length());
operands_count -= 1 + args.length();
- // Second argument indicates that we need to patch the handler table because
- // a delegating yield introduced a try-catch statement at expression level,
- // hence the operand count was off when we statically computed it.
- // TODO(mstarzinger): This special case disappears with do-expressions.
- if (args.length() == 2) {
- CONVERT_SMI_ARG_CHECKED(handler_index, 1);
- Handle<Code> code(frame->unchecked_code());
- Handle<HandlerTable> table(HandlerTable::cast(code->handler_table()));
- int handler_depth = operands_count - TryBlockConstant::kElementCount;
- table->SetRangeDepth(handler_index, handler_depth);
- }
-
if (operands_count == 0) {
// Although it's semantically harmless to call this function with an
// operands_count of zero, it is also unnecessary.
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698