Package weasel.interpreter.WeaselThread

Examples of weasel.interpreter.WeaselThread.StackElement


      if(nativeMethod==null){
        nativeMethod = interpreter.getNativeMethod(methodBody.getNameAndDesk());
      }
      Object[] params = new Object[this.method.getParamClasses().length];
      for(int i=0; i<params.length; i++){
        StackElement se = thread.pop();
        if(se.value==null){
          params[i] = interpreter.getObject(se.object);
        }else{
          params[i] = se.value;
        }
View Full Code Here


  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    resolve(interpreter);
    StackElement se = thread.pop();
    WeaselObject object = interpreter.getObject(thread.getObject(thread.popObject()));
    thread.push(se);
    switch(WeaselPrimitive.getPrimitiveID(type)){
    case WeaselPrimitive.BOOLEAN:
      field.setBoolean(object, (Boolean)se.value);
View Full Code Here

    primitiveID = dataInputStream.readInt();
  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    StackElement o1 = thread.pop();
    StackElement o2 = thread.pop();
   
    switch(primitiveID){
    case WeaselPrimitive.BOOLEAN:
      thread.pushValue((Boolean)o1.value==(Boolean)o2.value);
    case WeaselPrimitive.CHAR:
View Full Code Here

      if(nativeMethod==null){
        nativeMethod = interpreter.getNativeMethod(methodBody.getNameAndDesk());
      }
      Object[] params = new Object[this.method.getParamClasses().length];
      for(int i=0; i<params.length; i++){
        StackElement se = thread.pop();
        if(se.value==null){
          params[i] = interpreter.getObject(se.object);
        }else{
          params[i] = se.value;
        }
View Full Code Here

    primitiveID = dataInputStream.readInt();
  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    StackElement o1 = thread.pop();
    StackElement o2 = thread.pop();
   
    switch(primitiveID){
    case WeaselPrimitive.BOOLEAN:
      thread.pushValue((Boolean)o1.value!=(Boolean)o2.value);
    case WeaselPrimitive.CHAR:
View Full Code Here

  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    resolve(interpreter);
    StackElement se = thread.get(thread.getStackPointer()-1);
    WeaselObject object = interpreter.getObject(thread.getObject(method.getStackBottom()-pos));
    switch(WeaselPrimitive.getPrimitiveID(type)){
    case WeaselPrimitive.BOOLEAN:
      field.setBoolean(object, (Boolean)se.value);
      break;
View Full Code Here

    primitiveID = dataInputStream.readInt();
  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    StackElement se = thread.pop();
    int index = (Integer)thread.popValue();
    WeaselObject array = interpreter.getObject(thread.popObject());
    thread.push(se);
    switch(primitiveID){
    case WeaselPrimitive.BOOLEAN:
View Full Code Here

    pop = dataInputStream.readInt();
  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    StackElement se = thread.pop();
    for(int i=0; i<pop; i++)
      thread.pop();
    thread.push(se);
    thread.callReturn();
  }
View Full Code Here

    primitiveID = dataInputStream.readInt();
  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    StackElement se = thread.pop();
    if(se.value==null){
      WeaselObject object = interpreter.getObject(se.object);
      if(object==null)
        throw new WeaselNativeException("Null pointer");
      WeaselField field = object.getWeaselClass().getField("value");
View Full Code Here

  }
 
  @Override
  public void run(WeaselInterpreter interpreter, WeaselThread thread, WeaselMethodExecutor method) {
    resolve(interpreter);
    StackElement se = thread.pop();
    if(se.value==null){
      WeaselObject object = interpreter.getObject(se.object);
      if(object!=null){
        WeaselChecks.checkCast(object.getWeaselClass(), weaselClass);
      }
View Full Code Here

TOP

Related Classes of weasel.interpreter.WeaselThread.StackElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.