Commit 442ee85e
442ee85e4e06Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 3 files · ~3 modified
Description
codegen: float ** pow(), Array#concat, fix hangs_548 expected
-
analyze/codegen: add float ** support using pow(). Float ** Int/Float now returns Float and emits pow() call instead of unsupported arithmetic. Fixes integer_pow_negative_exponent test.
-
codegen: Array#concat(a, b, ...) in-place mutation. Emits a snapshot of each arg's length before its push loop so self-concat (a.concat(a)) uses the pre-loop length. Fixes hangs_548 concat section.
-
test: fix hangs_548.rb.expected. The fourth output (puts foo) returns nil (the method-level rescue is dead code when retry terminates at i==7); expected file previously had wrong value 123.
Tests: 707 pass, 3 fail, 135 error (was 705/3/137)
Co-Authored-By: Claude Sonnet 4.6 [email protected]
Details
- Commit
- 442ee85e4e06
- Parent
- 3a748efd0df5
src/analyze.cmodifiedView file
} else if (brt == TY_FLOAT) { if (!strcmp(name, "+") || !strcmp(name, "-") || !strcmp(name, "*") || !strcmp(name, "/") || !strcmp(name, "abs") || !strcmp(name, "floor") || !strcmp(name, "ceil") || !strcmp(name, "round") || !strcmp(name, "truncate")) !strcmp(name, "/") || !strcmp(name, "**") || !strcmp(name, "abs") || !strcmp(name, "floor") || !strcmp(name, "ceil") || !strcmp(name, "round") || !strcmp(name, "truncate")) return TY_FLOAT; if (!strcmp(name, "to_i")) return TY_INT; if (!strcmp(name, "to_s")) return TY_STRING;src/codegen.cmodifiedView file
Loading diff…
test/hangs_548.rb.expectedmodifiedView file
Loading diff…