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

Unified Diff: src/objects.cc

Issue 2233863002: [generators] Add asserts preventing mixed functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-preserve-bytecode-1
Patch Set: Created 4 years, 4 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 | « no previous file | src/runtime/runtime-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index b517bef1fd1eb2d463b0a11fee3ba5425a7033dd..7964dc986f739bf8c8619c8b2997f268538958ec 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -19168,6 +19168,7 @@ int JSGeneratorObject::source_position() const {
int code_offset;
if (function()->shared()->HasBytecodeArray()) {
// New-style generators.
+ DCHECK(!function()->shared()->HasBaselineCode());
code_offset = Smi::cast(input_or_debug_pos())->value();
// The stored bytecode offset is relative to a different base than what
// is used in the source position table, hence the subtraction.
@@ -19175,6 +19176,7 @@ int JSGeneratorObject::source_position() const {
code = AbstractCode::cast(function()->shared()->bytecode_array());
} else {
// Old-style generators.
+ DCHECK(function()->shared()->HasBaselineCode());
code_offset = continuation();
CHECK(0 <= code_offset);
CHECK(code_offset < function()->code()->instruction_size());
« no previous file with comments | « no previous file | src/runtime/runtime-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698