Interface JSCodeResume<T extends ScriptOrFn<T>>

All Known Implementing Classes:
ACompilerData, CompilerData, JSCode, JSCodeResume.NullResume

public interface JSCodeResume<T extends ScriptOrFn<T>>
This interface represent a thing which can be executed in JavaScript, which could be a generator, or potentially in future an async function.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final JSCodeResume<?>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    resume(Context cx, T executableObject, Object state, VarScope scope, int operation, Object value)
    Resuem execution of the code represented by this object.
  • Field Details

    • NULL_RESUMABLE

      static final JSCodeResume<?> NULL_RESUMABLE
  • Method Details

    • resume

      Object resume(Context cx, T executableObject, Object state, VarScope scope, int operation, Object value)
      Resuem execution of the code represented by this object.
      Parameters:
      cx - should be context in which the call is being made
      executableObject - should be function or script which owns this code.
      state - should be the state object created at some previous point when execution was yielded.
      scope - should be the scope in which the code will be executed.
      operation - should be one of the constants defined on NativeGenerator and represents the operation being performed.
      value - represents the value being passed into the generator (see https://tc39.es/ecma262/#sec-generatorresume for details).
      Returns:
      the result of executing the code.