public IRTSDefine.Stack run(IRTSStack stack) { if (isConst()) { return(0); } if ((mProperty & IRTSDefine.Property.GLOBAL) == 0) { mValue = stack.getVar(mVar); } else { mValue = stack.getThread().getEngine().getVar(mVar); } if (mCast != null) { mValue = mCast.castValue(mValue); } return(0); }
public IRTSDefine.Stack run(IRTSStack stack) { if (!mChildLoaded) { mChildLoaded = true; if (stack.getThread().loadRunner(mChild)) { return(0); } } object v = mChild == null ? null : mChild.getOutput(); mValue = mCastType == null ? v : mCastType.castValue(v); return(0); }
public IRTSDefine.Stack run(IRTSStack stack) { if (mFunc == null) { mFunc = stack.getThread().getEngine().getFunction(mFuncName, mArgC); if (mFunc == null) { stack.getThread().catchError(IRTSDefine.Error.Runtime_NoFunctionDefine, "Don't find function defined:" + RTSUtil.keyOfFunc(mFuncName, mArgC)); return(0); } } while (mArgs != null && mArgCur < mArgs.length()) { IRTSRunner r = mArgs.get(mArgCur++); if (stack.getThread().loadRunner(r)) { return(0); } } if (!mLoaded) { mLoaded = true; object[] args = mArgC > 0 ? new object[mArgC] : null; if (args != null) { for (int i = 0; i < mArgC; i++) { IRTSRunner r = mArgs.get(i); if (r != null) { args[i] = r.getOutput(); } } } mFuncR = mFunc.createRunner(args); if (stack.getThread().loadRunner(mFuncR)) { return(0); } } mValue = mFuncR == null ? null : mFuncR.getOutput(); if (mCast != null) { mValue = mCast.castValue(mValue); } return(0); }
public IRTSDefine.Stack run(IRTSStack stack) { if (mRuntime != null && mChild != null) { int ret = mRuntime.LoadRunner(mChild.createRunner(), -1); if (mCastType != null) { mResult = mCastType.castValue(ret); } else { mResult = ret; } } return(0); }
public IRTSDefine.Stack run(IRTSStack stack) { while (mFuncNames != null && mFuncCur < mFuncNames.Length) { mFunc = stack.getThread().getEngine().getFunction(mFuncNames[mFuncCur++], mArgC); mFuncR = mFunc == null ? null : mFunc.createRunner(mArgs); if (stack.getThread().loadRunner(mFuncR)) { return(0); } } mValue = mFuncR == null ? null : mFuncR.getOutput(); if (mCast != null) { mValue = mCast.castValue(mValue); } return(0); }
public RTSVariableR(IRTSType castType, object value) { mCast = castType; mValue = castType == null ? value : castType.castValue(value); mProperty = IRTSDefine.Property.CONST; }
private void setValue(object v) { mValue = mReturnType == null ? v : mReturnType.castValue(v); }