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
|
||||
void CompileRelocations() {
|
||||
foreach (var symbol in mContext.SymbolTable) {
|
||||
symbol.CloseRelocations(this);
|
||||
symbol.CloseRelocations();
|
||||
}
|
||||
}
|
||||
void CompileData() {
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace arookas {
|
|||
mStack.Add(new sunScope(type));
|
||||
}
|
||||
#endif
|
||||
public void Pop(sunCompiler compiler) {
|
||||
public void Pop() {
|
||||
if (Count > 1) {
|
||||
#if SSC_SCOPES
|
||||
if (Top.Type == sunScopeType.Script) {
|
||||
|
@ -62,7 +62,7 @@ namespace arookas {
|
|||
#else
|
||||
// close relocations while we still have references to the symbols
|
||||
foreach (var variable in Top) {
|
||||
variable.CloseRelocations(compiler);
|
||||
variable.CloseRelocations();
|
||||
}
|
||||
#endif
|
||||
mStack.RemoveAt(Count - 1);
|
||||
|
|
|
@ -90,12 +90,10 @@ namespace arookas {
|
|||
}
|
||||
mRelocations.Add(relocation);
|
||||
}
|
||||
public void CloseRelocations(sunCompiler compiler) {
|
||||
compiler.Binary.Keep();
|
||||
public void CloseRelocations() {
|
||||
foreach (var relocation in mRelocations) {
|
||||
relocation.Relocate();
|
||||
}
|
||||
compiler.Binary.Back();
|
||||
}
|
||||
|
||||
public static sunSymbolModifiers GetModifiers(sunNode modifierlist) {
|
||||
|
@ -202,7 +200,7 @@ namespace arookas {
|
|||
}
|
||||
mBody.Compile(compiler);
|
||||
compiler.Binary.WriteRET0();
|
||||
compiler.Context.Scopes.Pop(compiler);
|
||||
compiler.Context.Scopes.Pop();
|
||||
++mCompiles;
|
||||
}
|
||||
public override sunRelocation CreateCallSite(sunCompiler compiler, int argCount) {
|
||||
|
|
Loading…
Reference in a new issue