Removed compiler parameter for relocations
Since relocations are linked with the binary formatter directly, and each already does a keep/back restore, no point in doing that again when closing them.
This commit is contained in:
parent
799b6e5093
commit
5163c94e3a
3 changed files with 5 additions and 7 deletions
|
@ -131,7 +131,7 @@ namespace arookas {
|
||||||
#endif
|
#endif
|
||||||
void CompileRelocations() {
|
void CompileRelocations() {
|
||||||
foreach (var symbol in mContext.SymbolTable) {
|
foreach (var symbol in mContext.SymbolTable) {
|
||||||
symbol.CloseRelocations(this);
|
symbol.CloseRelocations();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void CompileData() {
|
void CompileData() {
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace arookas {
|
||||||
mStack.Add(new sunScope(type));
|
mStack.Add(new sunScope(type));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
public void Pop(sunCompiler compiler) {
|
public void Pop() {
|
||||||
if (Count > 1) {
|
if (Count > 1) {
|
||||||
#if SSC_SCOPES
|
#if SSC_SCOPES
|
||||||
if (Top.Type == sunScopeType.Script) {
|
if (Top.Type == sunScopeType.Script) {
|
||||||
|
@ -62,7 +62,7 @@ namespace arookas {
|
||||||
#else
|
#else
|
||||||
// close relocations while we still have references to the symbols
|
// close relocations while we still have references to the symbols
|
||||||
foreach (var variable in Top) {
|
foreach (var variable in Top) {
|
||||||
variable.CloseRelocations(compiler);
|
variable.CloseRelocations();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
mStack.RemoveAt(Count - 1);
|
mStack.RemoveAt(Count - 1);
|
||||||
|
|
|
@ -90,12 +90,10 @@ namespace arookas {
|
||||||
}
|
}
|
||||||
mRelocations.Add(relocation);
|
mRelocations.Add(relocation);
|
||||||
}
|
}
|
||||||
public void CloseRelocations(sunCompiler compiler) {
|
public void CloseRelocations() {
|
||||||
compiler.Binary.Keep();
|
|
||||||
foreach (var relocation in mRelocations) {
|
foreach (var relocation in mRelocations) {
|
||||||
relocation.Relocate();
|
relocation.Relocate();
|
||||||
}
|
}
|
||||||
compiler.Binary.Back();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static sunSymbolModifiers GetModifiers(sunNode modifierlist) {
|
public static sunSymbolModifiers GetModifiers(sunNode modifierlist) {
|
||||||
|
@ -202,7 +200,7 @@ namespace arookas {
|
||||||
}
|
}
|
||||||
mBody.Compile(compiler);
|
mBody.Compile(compiler);
|
||||||
compiler.Binary.WriteRET0();
|
compiler.Binary.WriteRET0();
|
||||||
compiler.Context.Scopes.Pop(compiler);
|
compiler.Context.Scopes.Pop();
|
||||||
++mCompiles;
|
++mCompiles;
|
||||||
}
|
}
|
||||||
public override sunRelocation CreateCallSite(sunCompiler compiler, int argCount) {
|
public override sunRelocation CreateCallSite(sunCompiler compiler, int argCount) {
|
||||||
|
|
Loading…
Reference in a new issue