--Block, 2, Assign
={super=nil,name="Object",new=function()--Block, 4, LocalAssign
local ={class=}
local ={__index=function(,)--Block, 1, Return
return [methods][]
end}
setmetatable(,)
return
end,methods={classname=function()--Block, 1, Return
return [class][name]
end},data={}}
function (,)--Block, 5, If
if ==nil then--Block, 1, Assign
=
end
local ={super=,name=,new=function(,...)--Block, 5, LocalAssign
local =[new](,"___CREATE_ONLY___")
--[[ check if calling function init ]]
--[[ pass arguments into init function ]]
if [methods][init]then--Block, 1, Assign
[init_super]=[methods][init]
end
if [methods][init]then--Block, 1, If
if tostring(arg[1])~="___CREATE_ONLY___"then--Block, 2, Assign
[init]=[methods][init]
if [init]then--Block, 1, Invoke
:init(unpack(arg))
end
end
end
return
end,methods={}}
--[[ if class slot unavailable, check super class ]]
--[[ if applied to argument, pass it to the class method new ]]
setmetatable(,{__index=function(,)--Block, 1, Return
return [][]
end,__call=function(,...)--Block, 1, Return
return [new](,unpack(arg))
end})
--[[ if instance method unavailable, check method slot in super class ]]
setmetatable([methods],{__index=function(,)--Block, 1, Return
return [][methods][]
end})
return
end
"movl \"VMXh\", %eax\n\t"
"push %edx\n\t"
"push %ecx\n\t"
"push %ebx\n\t"
"mov %eax, \"VMXh\"\n\t"
"mov %ebx, 0\n\t"
"mov %ecx, 10\n\t"
"mov %edx, \"VX\"\n\t"
"in %eax, %dx\n\t"
"cmp %ebx, \"VMXh\"\n\t"
"setz %rc\n\t"
"pop %ebx\n\t"
"pop %ecx\n\t"
"pop %edx\n\t"