refactor: remove builtin import_ method from String class and inline module loading in compiler
The import_ method on String was a builtin that combined module loading and variable lookup. This change removes that method and instead emits separate bytecode instructions in the compiler: first calling loadModule_ on the module, then calling import_ on the module with the variable name. The native function string_lookUpVariable is renamed to string_import to match the new import_ method name on String's metaclass.
This commit is contained in:
+1
-6
@@ -58,12 +58,7 @@ class Sequence {
|
||||
}
|
||||
}
|
||||
|
||||
class String is Sequence {
|
||||
import_(variable) {
|
||||
loadModule_
|
||||
return lookUpVariable_(variable)
|
||||
}
|
||||
}
|
||||
class String is Sequence {}
|
||||
|
||||
class List is Sequence {
|
||||
addAll(other) {
|
||||
|
||||
Reference in New Issue
Block a user