Commit 635cbec3
635cbec318f5Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 3 files · +2 added · ~1 modified
Description
Merge pull request #222 from Halvanhelv/feat/integer-nobits
feat(codegen): add Integer#nobits?
Conflicts:
spinel_codegen.rb
Details
- Commit
- 635cbec318f5
- Parent
- a66430d0c3e2
- Merge parent
- 62d4639f69ed
spinel_codegen.rbmodifiedView file
@@ -2614,6 +2614,9 @@
26142614
if mname == "anybits?"26152615
return "bool"26162616
end2617+
if mname == "nobits?"2618+
return "bool"2619+
end26172620
if mname == "zero?"26182621
return "bool"26192622
end@@ -18789,6 +18792,7 @@
1878918792
if mname == "odd?"1879018793
return "((" + rc + ") % 2 != 0)"1879118794
end18795+
<<<<<<< HEAD1879218796
if mname == "allbits?"1879318797
mask = compile_arg0(nid)1879418798
return "(((" + rc + ") & (" + mask + ")) == (" + mask + "))"@@ -18796,6 +18800,9 @@
1879618800
if mname == "anybits?"1879718801
return "(((" + rc + ") & (" + compile_arg0(nid) + ")) != 0)"1879818802
end18803+
if mname == "nobits?"18804+
return "(((" + rc + ") & (" + compile_arg0(nid) + ")) == 0)"18805+
end1879918806
if mname == "zero?"1880018807
return "((" + rc + ") == 0)"1880118808
endtest/integer_nobits.rbaddedView file
Loading diff…
test/integer_nobits.rb.expectedaddedView file
Loading diff…