Example #1
0
 @Override
 public RTCode runDetails(final RTObject myEnclosedScope) {
   final RTDynamicScope activationRecord =
       RunTimeEnvironment.runTimeEnvironment_.currentDynamicScope();
   final RTSetObject theListObject = (RTSetObject) activationRecord.getObject("this");
   final RTObject rawElement = activationRecord.getObject("element");
   theListObject.add(rawElement);
   return super.nextCode();
 }
Example #2
0
 @Override
 public RTCode runDetails(final RTObject myEnclosedScope) {
   final RTDynamicScope activationRecord =
       RunTimeEnvironment.runTimeEnvironment_.currentDynamicScope();
   final RTSetObject theListObject = (RTSetObject) activationRecord.getObject("this");
   theListObject.ctor();
   RunTimeEnvironment.runTimeEnvironment_.pushStack(this);
   return super.nextCode();
 }
Example #3
0
 @Override
 public RTCode runDetails(final RTObject myEnclosedScope) {
   final RTDynamicScope activationRecord =
       RunTimeEnvironment.runTimeEnvironment_.currentDynamicScope();
   final RTMapObject theMapObject = (RTMapObject) activationRecord.getObject("this");
   final int rawResult = theMapObject.size();
   final RTIntegerObject result = new RTIntegerObject(rawResult);
   RunTimeEnvironment.runTimeEnvironment_.pushStack(result);
   return super.nextCode();
 }
Example #4
0
 @Override
 public RTCode runDetails(final RTObject myEnclosedScope) {
   final RTDynamicScope activationRecord =
       RunTimeEnvironment.runTimeEnvironment_.currentDynamicScope();
   final RTIntegerObject key = (RTIntegerObject) activationRecord.getObject("key");
   final RTMapObject theMapObject = (RTMapObject) activationRecord.getObject("this");
   final RTStackable result = (RTStackable) theMapObject.remove(key);
   RunTimeEnvironment.runTimeEnvironment_.pushStack(result);
   return super.nextCode();
 }
Example #5
0
 @Override
 public RTCode runDetails(final RTObject myEnclosedScope) {
   final RTDynamicScope activationRecord =
       RunTimeEnvironment.runTimeEnvironment_.currentDynamicScope();
   final RTMapObject theMapObject = (RTMapObject) activationRecord.getObject("this");
   final RTObject rawKey = activationRecord.getObject("key");
   final RTObject value = theMapObject.get(rawKey);
   RunTimeEnvironment.runTimeEnvironment_.pushStack(value);
   return super.nextCode();
 }
Example #6
0
    @Override
    public RTCode runDetails(final RTObject myEnclosedScope) {
      final RTDynamicScope activationRecord =
          RunTimeEnvironment.runTimeEnvironment_.currentDynamicScope();
      final RTSetObject theListObject = (RTSetObject) activationRecord.getObject("this");
      final boolean rawResult = theListObject.isEmpty();
      final RTBooleanObject result = new RTBooleanObject(rawResult);

      addRetvalTo(activationRecord);
      activationRecord.setObject("ret$val", result);

      return super.nextCode();
    }
Example #7
0
    @Override
    public RTCode runDetails(final RTObject myEnclosedScope) {
      final RTDynamicScope activationRecord =
          RunTimeEnvironment.runTimeEnvironment_.currentDynamicScope();
      final RTObject argument = activationRecord.getObject("element");
      final RTSetObject theListObject = (RTSetObject) activationRecord.getObject("this");
      final RTObject result = (RTObject) theListObject.contains(argument);

      addRetvalTo(activationRecord);
      activationRecord.setObject("ret$val", result);

      return super.nextCode();
    }
Example #8
0
 protected void addRetvalTo(final RTDynamicScope activationRecord) {
   if (null == activationRecord.getObject("ret$val")) {
     activationRecord.addObjectDeclaration("ret$val", null);
   }
 }