protected sunRelocation(sunBinary binary) { if (binary == null) { throw new ArgumentNullException("binary"); } mBinary = binary; mPoint = mBinary.Offset; }
protected sunSymbolRelocation(sunBinary binary, TSymbol symbol) : base(binary) { if (symbol == null) { throw new ArgumentNullException("symbol"); } mSymbol = symbol; }
public sunCompilerResults Compile(string name, sunBinary binary, sunImportResolver resolver) { if (name == null) { throw new ArgumentNullException("name"); } if (binary == null) { throw new ArgumentNullException("binary"); } if (resolver == null) { throw new ArgumentNullException("resolver"); } var results = new sunCompilerResults(); var timer = Stopwatch.StartNew(); try { mBinary = binary; mResolver = resolver; mContext.Clear(); mBinary.Open(); mBinary.BeginText(); CompileBody(name); CompileFunctions(); #if SSC_CLEAN_SYMBOLS CleanSymbols(); #endif CompileRelocations(); mBinary.EndText(); mBinary.BeginData(); CompileData(); mBinary.EndData(); mBinary.BeginSymbol(); CompileSymbols(); mBinary.EndSymbol(); mBinary.Close(); results.Data = mContext.DataTable.ToArray(); results.Symbols = mContext.SymbolTable.Select(i => new sunSymbolInfo(i.Type, i.Name)).ToArray(); } catch (sunCompilerException ex) { results.Error = ex; } timer.Stop(); results.CompileTime = timer.Elapsed; return(results); }
public sunVariableSetSite(sunBinary binary, sunVariableSymbol symbol) : base(binary, symbol) { mBinary.WriteASS(0, 0); }
public sunFunctionCallSite(sunBinary binary, sunFunctionSymbol symbol, int argCount) : base(binary, symbol) { mArgCount = argCount; mBinary.WriteCALL(0, 0); }
public sunBuiltinCallSite(sunBinary binary, sunBuiltinSymbol symbol, int argCount) : base(binary, symbol) { mArgCount = argCount; mBinary.WriteFUNC(0, 0); }
public sunJumpSite(sunBinary binary) : base(binary) { mBinary.WriteJMP(0); }
public sunJumpNotEqualSite(sunBinary binary) : base(binary) { mBinary.WriteJNE(0); }
public sunVariableDecSite(sunBinary binary, sunVariableSymbol symbol) : base(binary, symbol) { mBinary.WriteDEC(0, 0); }