Skip to content
Snippets Groups Projects

New new string

Merged Xun Yang requested to merge new-new-string into master
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
+ 2
1
@@ -494,6 +494,7 @@ class ClassCreateNode(ASTNode):
# 2. Pointing first item to vtable
self.code += importHelper(classDef.name, self.typeName, "C_"+classDef.name)
self.code += p(instruction="mov", arg1="[eax]", arg2="dword C_" + classDef.name, comment="first item is vtable pointer")
self.code += p("mov", "ebx", "eax", "store obj ptr at ebx")
# 3. Calling constructor
self.code += "; Calling constructor for object\n"
@@ -504,7 +505,7 @@ class ClassCreateNode(ASTNode):
self.args.codeGen()
self.code += self.args.code
self.code += p(instruction="push", arg1="eax", comment="pushing object as last argument")
self.code += p(instruction="push", arg1="ebx", comment="pushing object as last argument")
label = "M_" + self.cons.typeName + "_" + self.cons.name + "_" + self.cons.paramTypes
self.code += importHelper(classDef.name, self.typeName, label)
self.code += p(instruction="call", arg1=label, comment="Calling constructor")
Loading