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

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

Issue 2049663002: Run more tests with --ignition-generators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 e201c49fc6fe877b9f36f48e72866158685f6089..11bb46e34d16e7328d3888b63fba28fc07214024 100644
--- a/src/runtime/runtime-generator.cc
+++ b/src/runtime/runtime-generator.cc
@@ -146,14 +146,15 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) {
DCHECK(args.length() == 1);
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0);
- if (generator->is_suspended()) {
- Handle<Code> code(generator->function()->code(), isolate);
- int offset = generator->continuation();
- RUNTIME_ASSERT(0 <= offset && offset < code->instruction_size());
- return Smi::FromInt(code->SourcePosition(offset));
- }
+ if (!generator->is_suspended()) return isolate->heap()->undefined_value();
- return isolate->heap()->undefined_value();
+ if (FLAG_ignition && FLAG_ignition_generators) UNIMPLEMENTED();
+
+ DCHECK(!generator->function()->shared()->HasBytecodeArray());
+ Handle<Code> code(generator->function()->code(), isolate);
+ int offset = generator->continuation();
+ RUNTIME_ASSERT(0 <= offset && offset < code->instruction_size());
+ return Smi::FromInt(code->SourcePosition(offset));
}
} // namespace internal

Powered by Google App Engine
This is Rietveld 408576698