Skip to content

Commit

Permalink
Replace [pushBack] with [append] (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
myCrack authored Dec 7, 2022
1 parent daf4c7d commit 90b983b
Show file tree
Hide file tree
Showing 16 changed files with 236 additions and 236 deletions.
2 changes: 1 addition & 1 deletion NameManager.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ NameManager: [{
current: nameId @names.at;
item.file isNil [current.overloadCount 1 + @current.!overloadCount] when
item.isLocal [current.localCount 1 + @current.!localCount] when
@item @current.@items.pushBack
@item @current.@items.append
];

findItem: [
Expand Down
4 changes: 2 additions & 2 deletions Var.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ makeStringId: [
] [
result: processor.nameBuffer.size;
string makeStringView result @[email protected]
@string @processor.@nameBuffer.pushBack
@string @processor.@nameBuffer.append
result
] if
];
Expand All @@ -556,7 +556,7 @@ makeDefaultVarId: [
varId: processor: ;;

[varId processor.defaultVarNames.getSize < ~] [
-1 @processor.@defaultVarNames.pushBack
-1 @processor.@defaultVarNames.append
] while

result: varId @[email protected];
Expand Down
8 changes: 4 additions & 4 deletions astOptimizers.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ optimizeLabels: [
current:;
current.data.getTag AstNodeType.Label = [
AstNodeType.Label current.data.get.children @[email protected].@nodes [
@newIndexArray.@nodes.pushBack
@newIndexArray.@nodes.append
] each
] when

@current @newIndexArray.@nodes.pushBack
@current @newIndexArray.@nodes.append
] each

@newIndexArray @currentIndexArray set
Expand Down Expand Up @@ -97,8 +97,8 @@ concatParserResult: [
] if
] each

@currentArray @mresult.@memory.pushBack
@currentArray @mresult.@memory.append
] each

current.root @mresult.@roots.pushBack
current.root @mresult.@roots.append
];
38 changes: 19 additions & 19 deletions builtinImpl.mpl
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ mplNumberBuiltinOp: [
arg @processor @block createDerefToRegister @irarg.@irNameId set
arg @processor getMplSchema.irTypeId @irarg.@irTypeId set
FALSE @irarg.@byRef set
irarg @args.pushBack
irarg @args.append

result args String @opName FALSE dynamic @processor @block createCallIR retName:;

Expand Down Expand Up @@ -334,7 +334,7 @@ parseFieldToSignatureCaptureArray: [
VarStruct varStruct.data.get.get.fields [
refToVar: .refToVar;
refToVar isVirtual ["input cannot be virtual" @processor block compilerError] when
refToVar @result.pushBack
refToVar @result.append
] each
] when

Expand Down Expand Up @@ -404,9 +404,9 @@ parseSignature: [
#todo: detect temporality
returnVar: return getVar;
returnVar.temporary [
return @result.@outputs.pushBack
return @result.@outputs.append
] [
@return TRUE dynamic @processor @block createRef @result.@outputs.pushBack
@return TRUE dynamic @processor @block createRef @result.@outputs.append
] if
] if
] when
Expand Down Expand Up @@ -633,10 +633,10 @@ staticityOfBinResult: [
FALSE @irarg.@byRef set
arg1 @processor @block createDerefToRegister @irarg.@irNameId set
arg1 @processor getMplSchema.irTypeId @irarg.@irTypeId set
irarg @args.pushBack
irarg @args.append
arg2 @processor @block createDerefToRegister @irarg.@irNameId set
arg2 @processor getMplSchema.irTypeId @irarg.@irTypeId set
irarg @args.pushBack
irarg @args.append

result args String tag VarReal32 = ["@llvm.pow.f32" makeStringView] ["@llvm.pow.f64" makeStringView] if FALSE dynamic @processor @block createCallIR retName:;

Expand Down Expand Up @@ -736,7 +736,7 @@ staticityOfBinResult: [
field: Field;
processor.specialNames.emptyNameInfo @field.@nameInfo set
element @field.@refToVar set
field @struct.@fields.pushBack
field @struct.@fields.append
i 1 + @i set TRUE
] &&
] loop
Expand All @@ -763,7 +763,7 @@ staticityOfBinResult: [
] &&
] loop

result @block.@candidatesToDie.pushBack
result @block.@candidatesToDie.append
result @block push
] when
] when
Expand Down Expand Up @@ -1129,22 +1129,22 @@ staticityOfBinResult: [
field: Field;
varPrev @field.@refToVar set
"prev" makeStringView @processor findNameInfo @field.@nameInfo set
@field @struct.@fields.pushBack
@field @struct.@fields.append

field: Field;
varName @field.@refToVar set
"name" makeStringView @processor findNameInfo @field.@nameInfo set
@field @struct.@fields.pushBack
@field @struct.@fields.append

field: Field;
varLine @field.@refToVar set
"line" makeStringView @processor findNameInfo @field.@nameInfo set
@field @struct.@fields.pushBack
@field @struct.@fields.append

field: Field;
varColumn @field.@refToVar set
"column" makeStringView @processor findNameInfo @field.@nameInfo set
@field @struct.@fields.pushBack
@field @struct.@fields.append

@struct owner VarStruct @processor @block createVariable @processor.@varForCallTrace set

Expand Down Expand Up @@ -1477,7 +1477,7 @@ staticityOfBinResult: [
@result @processor @block createAllocIR @processor @block callInit

result isAutoStruct [
result @block.@candidatesToDie.pushBack
result @block.@candidatesToDie.append
] when
] when

Expand Down Expand Up @@ -1666,7 +1666,7 @@ staticityOfBinResult: [
field: Field;
processor.specialNames.emptyNameInfo @field.@nameInfo set
@element TRUE dynamic @processor @block createRef @field.@refToVar set
field @struct.@fields.pushBack
field @struct.@fields.append
] each

result: @struct owner VarStruct @processor @block createVariable;
Expand Down Expand Up @@ -1796,8 +1796,8 @@ tryFindInPath: [
errorInfo: processor.files.getSize fullFileName makeStringView loadStringResult.data makeStringView @processor.@multiParserResult @processor.@nameManager addToProcess;
errorInfo "" = [
fileId: FALSE fullFileName makeStringView @processor addFileNameToProcessor;
fullFileName @processor.@options.@fileNames.pushBack
fileId @processor.@unfinishedFiles.pushBack
fullFileName @processor.@options.@fileNames.append
fileId @processor.@unfinishedFiles.append
@fullFileName @result.@fullFileName set
FindInPathResult.UNCOMPILED_FILE @result.!success
] [
Expand Down Expand Up @@ -1854,7 +1854,7 @@ tryFindInPath: [
message: ("module not found: " fileName) assembleString;
message @processor block compilerError
oldSuccess [
@processor.@result.@errorInfo @processor.@result.@globalErrorInfo.pushBack
@processor.@result.@errorInfo @processor.@result.@globalErrorInfo.append
-1 @processor.@result clearProcessorResult
] when
]
Expand Down Expand Up @@ -1894,7 +1894,7 @@ tryFindInPath: [
gnr: label.nameInfo index @processor @block file getNameWithOverloadIndex;
cnr: gnr depth @processor @block file captureName;

{refToVar: cnr.refToVar new; nameInfo: label.nameInfo new; } @addNameData.pushBack
{refToVar: cnr.refToVar new; nameInfo: label.nameInfo new; } @addNameData.append

labelCount 1 + !labelCount
] when
Expand Down Expand Up @@ -1965,7 +1965,7 @@ tryFindInPath: [

message @processor block compilerError
oldSuccess [
@processor.@result.@errorInfo @processor.@result.@globalErrorInfo.pushBack
@processor.@result.@errorInfo @processor.@result.@globalErrorInfo.append
-1 @processor.@result clearProcessorResult
] when
] when
Expand Down
Loading

0 comments on commit 90b983b

Please sign in to comment.