Index: src/runtime/runtime-generator.cc |
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc |
index 9c875300c6ba1aaf3d2fc90564f32d65bffaf2ef..602b2c66cccbc0e21972a31baa09d8b482b2dc61 100644 |
--- a/src/runtime/runtime-generator.cc |
+++ b/src/runtime/runtime-generator.cc |
@@ -145,60 +145,5 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) { |
return isolate->heap()->undefined_value(); |
} |
- |
-RUNTIME_FUNCTION(Runtime_SuspendIgnitionGenerator) { |
- HandleScope scope(isolate); |
- DCHECK(args.length() == 2); |
- CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); |
- CONVERT_ARG_HANDLE_CHECKED(Smi, state, 1); |
- |
- JavaScriptFrameIterator it(isolate); |
- JavaScriptFrame* frame = it.frame(); |
- Handle<JSFunction> function(frame->function()); |
- CHECK(function->shared()->is_generator()); |
- CHECK_EQ(frame->type(), StackFrame::INTERPRETED); |
- |
- // Save register file. |
- int size = function->shared()->bytecode_array()->register_count(); |
- Handle<FixedArray> register_file = isolate->factory()->NewFixedArray(size); |
- for (int i = 0; i < size; ++i) { |
- Object* value = |
- static_cast<InterpretedFrame*>(frame)->ReadInterpreterRegister(i); |
- register_file->set(i, value); |
- } |
- |
- generator->set_operand_stack(*register_file); |
- generator->set_context(Context::cast(frame->context())); |
- generator->set_continuation(state->value()); |
- |
- return isolate->heap()->undefined_value(); |
-} |
- |
- |
-RUNTIME_FUNCTION(Runtime_ResumeIgnitionGenerator) { |
- HandleScope scope(isolate); |
- DCHECK(args.length() == 1); |
- CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); |
- |
- JavaScriptFrameIterator it(isolate); |
- JavaScriptFrame* frame = it.frame(); |
- Handle<JSFunction> function(frame->function()); |
- CHECK(function->shared()->is_generator()); |
- CHECK_EQ(frame->type(), StackFrame::INTERPRETED); |
- |
- // Restore register file. |
- int size = function->shared()->bytecode_array()->register_count(); |
- DCHECK_EQ(size, generator->operand_stack()->length()); |
- for (int i = 0; i < size; ++i) { |
- Object* value = generator->operand_stack()->get(i); |
- static_cast<InterpretedFrame*>(frame)->WriteInterpreterRegister(i, value); |
- } |
- generator->set_operand_stack(isolate->heap()->empty_fixed_array()); |
- |
- int state = generator->continuation(); |
- generator->set_continuation(JSGeneratorObject::kGeneratorExecuting); |
- return Smi::FromInt(state); |
-} |
- |
} // namespace internal |
} // namespace v8 |