org.xwt.js
Class JS.Context

java.lang.Object
  extended byorg.xwt.js.JS.Context
Enclosing class:
JS

public static class JS.Context
extends java.lang.Object

encapsulates the state of a JavaScript "thread" (ie stack)


Field Summary
static java.lang.Object pause
          Return this from call/get/put in order to make the interpreter pause.
 JS.Scope scope
          the currently-executing scope
 
Constructor Summary
JS.Context(Function function, JS.Scope scope)
           
 
Method Summary
static JS.Context current()
          fetches the currently-executing javascript function
static int getLine()
           
static java.lang.String getSourceName()
           
 java.lang.Object resume()
           
 java.lang.Object resume(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pause

public static java.lang.Object pause
Return this from call/get/put in order to make the interpreter pause. The interpreter will expect a value (the return from the call or the get) to be pushed onto the stack when it is resumed.


scope

public JS.Scope scope
the currently-executing scope

Constructor Detail

JS.Context

public JS.Context(Function function,
                  JS.Scope scope)
Method Detail

getLine

public static int getLine()

getSourceName

public static java.lang.String getSourceName()

current

public static JS.Context current()
fetches the currently-executing javascript function


resume

public java.lang.Object resume()

resume

public java.lang.Object resume(java.lang.Object o)