Commit 37947391

3794739160d3Merged

sacckey <[email protected]> · 6 months ago · 2 files · +1 added · ~1 modified

Description

fix(codegen): handle ::ARGV in constant receiver dispatch

Details

Commit
3794739160d3
Parent
ad9902afe011

spinel_codegen.rbmodifiedView file

@@ -16138,9 +16138,10 @@
1613816138 end
1613916139
1614016140 def compile_constant_recv_expr(nid, mname, recv, rc)
16141- # ARGV methods
16142- if @nd_type[recv] == "ConstantReadNode"
16143- if @nd_name[recv] == "ARGV"
16141+ rcname = constructor_class_name(recv)
16142+ if rcname != ""
16143+ # ARGV methods
16144+ if rcname == "ARGV"
1614416145 if mname == "length"
1614516146 return "sp_argv.len"
1614616147 end
@@ -16149,10 +16150,6 @@
1614916150 return "((" + idx_expr + " < sp_argv.len) ? sp_argv.data[(int)" + idx_expr + "] : NULL)"
1615016151 end
1615116152 end
16152- end
16153-
16154- rcname = constructor_class_name(recv)
16155- if rcname != ""
1615616153 # Math
1615716154 if rcname == "Math"
1615816155 if mname == "sqrt"