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
end1613916139
1614016140
def compile_constant_recv_expr(nid, mname, recv, rc)16141-
# ARGV methods16142-
if @nd_type[recv] == "ConstantReadNode"16143-
if @nd_name[recv] == "ARGV"16141+
rcname = constructor_class_name(recv)16142+
if rcname != ""16143+
# ARGV methods16144+
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
end1615116152
end16152-
end16153-
16154-
rcname = constructor_class_name(recv)16155-
if rcname != ""1615616153
# Math1615716154
if rcname == "Math"1615816155
if mname == "sqrt"test/constant_path_argv.rbaddedView file
Loading diff…