-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a150a50
commit 770f172
Showing
25 changed files
with
1,516 additions
and
1,764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
"control" use | ||
|
||
Mref: [{ | ||
ObjectSchema:; | ||
data: 0nx dynamic; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
"Array.Array" use | ||
"HashTable.HashTable" use | ||
"HashTable.hash" use | ||
"String.String" use | ||
"String.StringView" use | ||
"String.hash" use | ||
"String.toString" use | ||
"Array" use | ||
"HashTable" use | ||
"String" use | ||
"control" use | ||
|
||
NameManager: [{ | ||
|
@@ -19,14 +15,19 @@ NameManager: [{ | |
nameId 1 + @names.enlarge | ||
string.getStringView nameId @textNameIds.insertUnsafe # Make StringView using the source String object, reference should remain valid when we move String | ||
@string move @names.last.@text set | ||
0 @names.last.!overloadCount | ||
0 @names.last.!localCount | ||
nameId | ||
] if | ||
]; | ||
|
||
addItem: [ | ||
item: nameId:;; | ||
|
||
@item move nameId @[email protected] | ||
current: nameId @names.at; | ||
item.file isNil [current.overloadCount 1 + @current.!overloadCount] when | ||
item.isLocal [current.localCount 1 + @current.!localCount] when | ||
@item move @[email protected] | ||
]; | ||
|
||
findItem: [ | ||
|
@@ -45,6 +46,16 @@ NameManager: [{ | |
index | ||
]; | ||
|
||
hasOverload: [ | ||
nameId: copy; | ||
nameId @names.at.overloadCount 0 > | ||
]; | ||
|
||
hasLocalDefinition: [ | ||
nameId: copy; | ||
nameId @names.at.localCount 0 > | ||
]; | ||
|
||
getItem: [ | ||
index: nameId:;; | ||
index nameId @[email protected] | ||
|
@@ -58,14 +69,21 @@ NameManager: [{ | |
removeItem: [ | ||
nameId:; | ||
|
||
nameId @[email protected] | ||
current: nameId @names.at; | ||
current.items.last.file isNil [current.overloadCount 1 - @current.!overloadCount] when | ||
current.items.last.isLocal [current.localCount 1 - @current.!localCount] when | ||
|
||
@[email protected] | ||
|
||
]; | ||
|
||
# Private | ||
|
||
Name: [{ | ||
text: String; | ||
items: @itemSchema Array; | ||
overloadCount: Int32; | ||
localCount: Int32; | ||
}]; | ||
|
||
names: Name Array; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
|
||
"Array.Array" use | ||
"Owner.Owner" use | ||
"String.String" use | ||
"String.StringView" use | ||
"String.addLog" use | ||
"String.assembleString" use | ||
"String.makeStringView" use | ||
"String.toString" use | ||
"Variant.Variant" use | ||
"Array" use | ||
"Owner" use | ||
"String" use | ||
"Variant" use | ||
"control" use | ||
|
||
"Mref.Mref" use | ||
"staticCall.staticCall" use | ||
"Mref" use | ||
"staticCall" use | ||
|
||
Dirty: [0n8 dynamic]; | ||
Dynamic: [1n8 dynamic]; | ||
|
@@ -21,10 +15,11 @@ Virtual: [4n8 dynamic]; | |
|
||
ShadowReasonNo: [0]; | ||
ShadowReasonCapture: [1]; | ||
ShadowReasonFieldCapture: [2]; | ||
ShadowReasonInput: [3]; | ||
ShadowReasonField: [4]; | ||
ShadowReasonPointee: [5]; | ||
ShadowReasonStableName: [2]; | ||
ShadowReasonFieldCapture: [3]; | ||
ShadowReasonInput: [4]; | ||
ShadowReasonField: [5]; | ||
ShadowReasonPointee: [6]; | ||
|
||
VarInvalid: [ 0 static]; | ||
VarCond: [ 1 static]; | ||
|
@@ -49,7 +44,7 @@ VarStruct: [19 static]; | |
VarEnd: [20 static]; | ||
|
||
CodeNodeInfo: [{ | ||
file: ["File.FileSchema" use FileSchema] Mref; | ||
file: ["MplFile.FileSchema" use FileSchema] Mref; | ||
line: Int32; | ||
column: Int32; | ||
index: Int32; | ||
|
@@ -341,7 +336,6 @@ getVirtualValue: [ | |
refToVar isPlain [ | ||
refToVar getPlainConstantIR @result.cat | ||
] [ | ||
("Tag = " var.data.getTag) addLog | ||
[FALSE] "Wrong type for virtual value!" assert | ||
] if | ||
] | ||
|
@@ -544,6 +538,18 @@ makeStringId: [ | |
] if | ||
]; | ||
|
||
makeDefaultVarId: [ | ||
varId: processor: ;; | ||
|
||
[varId processor.defaultVarNames.getSize < ~] [ | ||
-1 @[email protected] | ||
] while | ||
|
||
result: varId @[email protected]; | ||
result 0 < [("%var." varId) assembleString @processor makeStringId @result set] when | ||
result copy | ||
]; | ||
|
||
markAsUnableToDie: [ | ||
refToVar:; | ||
var: @refToVar getVar; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.