raven-compiler/src/main/java/org/raven/compiler/Method.java
/**
     * Read from or store to a virtual field in the current class.
     * Must be in a non-static context.
     *
     * @param var  The var definition
     * @param load whether we are reading or writing to the field
     */
Read from or store to a virtual field in the current class.
Must be in a non-static context.

@param var  The var definition
@param load whether we are reading or writing to the field
Read from or store to a virtual field in the current class . Must be in a non - static context . @param var The var definition @param load whether we are reading or writing to the field
private void accessVirtualField(final VarDecl var, final boolean load) {
        int idx = getLocal("this");
        if (idx != 0) {
            Errors.put(ctx.getOwner() + " line " + var.getName().getLineNumber() + " Cannot access field in non static context: " + var.getName());
            return;
        }
        visitVarInsn(ALOAD, idx);
        if (!load) {
            visitInsn(SWAP);
        }
        visitFieldInsn(load ? GETFIELD : PUTFIELD, ctx.getOwner(), var.getName().toString(), getDesc(TObject.class));
    }
private void accessVirtualField ( final VarDecl var , final boolean load ) { int idx = getLocal ( "this" ) ; if ( idx != 0 ) { Errors . put ( ctx . getOwner ( ) + " line " + var . getName ( ) . getLineNumber ( ) + " Cannot access field in non static context: " + var . getName ( ) ) ; return ; } visitVarInsn ( ALOAD , idx ) ; if ( ! load ) { visitInsn ( SWAP ) ; } visitFieldInsn ( load ? GETFIELD : PUTFIELD , ctx . getOwner ( ) , var . getName ( ) . toString ( ) , getDesc ( TObject . class ) ) ; }
Read from or store to a virtual field in the current class.
Read from or store to a virtual field in the current class .