Index: src/runtime/runtime-generator.cc |
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc |
index 2b55d68be3091df9c53228cf9f79c2f9276ea095..19f57d79231dda4759eb184380bbddf99016a95a 100644 |
--- a/src/runtime/runtime-generator.cc |
+++ b/src/runtime/runtime-generator.cc |
@@ -21,11 +21,12 @@ RUNTIME_FUNCTION(Runtime_CreateJSGeneratorObject) { |
CHECK(function->shared()->is_resumable()); |
Handle<FixedArray> operand_stack; |
- if (FLAG_ignition && FLAG_ignition_generators) { |
+ if (function->shared()->HasBytecodeArray()) { |
+ // New-style generators. |
int size = function->shared()->bytecode_array()->register_count(); |
operand_stack = isolate->factory()->NewFixedArray(size); |
} else { |
- DCHECK(!function->shared()->HasBytecodeArray()); |
+ // Old-style generators. |
operand_stack = handle(isolate->heap()->empty_fixed_array()); |
} |
@@ -148,9 +149,8 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) { |
if (!generator->is_suspended()) return isolate->heap()->undefined_value(); |
- if (FLAG_ignition && FLAG_ignition_generators) UNIMPLEMENTED(); |
+ if (generator->function()->shared()->HasBytecodeArray()) UNIMPLEMENTED(); |
- DCHECK(!generator->function()->shared()->HasBytecodeArray()); |
Handle<Code> code(generator->function()->code(), isolate); |
int offset = generator->continuation(); |
CHECK(0 <= offset && offset < code->instruction_size()); |