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

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

Issue 2079613003: [generators] Implement %GeneratorGetSourcePosition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enable test Created 4 years, 6 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
Index: src/runtime/runtime-generator.cc
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc
index 493e5b5a9c7935f2644ab09b730998d4fffe76a7..e4f02602f42d52d11d82ccce1833174839593752 100644
--- a/src/runtime/runtime-generator.cc
+++ b/src/runtime/runtime-generator.cc
@@ -146,13 +146,7 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) {
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
if (!generator->is_suspended()) return isolate->heap()->undefined_value();
-
- if (generator->function()->shared()->HasBytecodeArray()) UNIMPLEMENTED();
-
- Handle<Code> code(generator->function()->code(), isolate);
- int offset = generator->continuation();
- CHECK(0 <= offset && offset < code->instruction_size());
- return Smi::FromInt(code->SourcePosition(offset));
+ return Smi::FromInt(generator->source_position());
}
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698