Index: src/runtime/runtime-generator.cc |
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc |
index 493e5b5a9c7935f2644ab09b730998d4fffe76a7..3b65682bbc31383d1058c8c67b1d1e2893ba2929 100644 |
--- a/src/runtime/runtime-generator.cc |
+++ b/src/runtime/runtime-generator.cc |
@@ -40,7 +40,6 @@ RUNTIME_FUNCTION(Runtime_CreateJSGeneratorObject) { |
return *generator; |
} |
- |
RUNTIME_FUNCTION(Runtime_SuspendJSGeneratorObject) { |
HandleScope handle_scope(isolate); |
DCHECK(args.length() == 1); |
@@ -91,8 +90,6 @@ RUNTIME_FUNCTION(Runtime_GeneratorClose) { |
return isolate->heap()->undefined_value(); |
} |
- |
-// Returns function of generator activation. |
RUNTIME_FUNCTION(Runtime_GeneratorGetFunction) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
@@ -101,8 +98,6 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetFunction) { |
return generator->function(); |
} |
- |
-// Returns receiver of generator activation. |
RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
@@ -111,17 +106,14 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetReceiver) { |
return generator->receiver(); |
} |
- |
-// Returns input of generator activation. |
-RUNTIME_FUNCTION(Runtime_GeneratorGetInput) { |
+RUNTIME_FUNCTION(Runtime_GeneratorGetInputOrDebugPos) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, generator, 0); |
- return generator->input(); |
+ return generator->input_or_debug_pos(); |
} |
-// Returns resume mode of generator activation. |
RUNTIME_FUNCTION(Runtime_GeneratorGetResumeMode) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
@@ -130,7 +122,6 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetResumeMode) { |
return Smi::FromInt(generator->resume_mode()); |
} |
- |
RUNTIME_FUNCTION(Runtime_GeneratorGetContinuation) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
@@ -139,20 +130,13 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetContinuation) { |
return Smi::FromInt(generator->continuation()); |
} |
- |
RUNTIME_FUNCTION(Runtime_GeneratorGetSourcePosition) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
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 |