Commit 4a364af7
4a364af74ee5Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 2 files · ~2 modified
Description
Process.pid / Process.ppid
Map Process.pid -> getpid() and Process.ppid -> sp_process_ppid() (both int),
so Process.pid > 0 compiles instead of failing at the comparison on an
unresolved call.
make test: 173 pass / 5 fail / 666 error (was 172 / 5 / 667), no regressions.
Co-Authored-By: Claude Opus 4.8 (1M context) [email protected]
Details
- Commit
- 4a364af74ee5
- Parent
- 91464057619f
src/analyze.cmodifiedView file
@@ -289,6 +289,10 @@
289289
(!strcmp(name, "now") || !strcmp(name, "at") || !strcmp(name, "local") ||290290
!strcmp(name, "mktime") || !strcmp(name, "utc") || !strcmp(name, "gm")))291291
return TY_TIME;292+
if (rty && !strcmp(rty, "ConstantReadNode") &&293+
nt_str(nt, recv, "name") && !strcmp(nt_str(nt, recv, "name"), "Process") &&294+
(!strcmp(name, "pid") || !strcmp(name, "ppid")))295+
return TY_INT;292296
}293297
294298
/* Time instance methods */src/codegen.cmodifiedView file
Loading diff…