blob: e55cce2078d3cac55c60b5546b7ea26eb7b266a5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
include rt;
include run;
include icon;
// an o3 caller must see a published replacement of its callee: a future direct
// o3-to-o3 call has to keep a callee generation guard, not bind the old entry.
o3 int target() { return 7; }
o3 int caller() { int s = 0; for (int i = 0; i < 3; i++) s += target(); return s; }
fn main() {
let seven = run.tokens("7"), eight = run.tokens("8");
rt.put_n(caller()); rt.put_c(' ');
rt.put_n(icon.find_replace(target, seven, eight)); rt.put_c(' ');
rt.put_n(caller()); rt.put_c(10);
return 0;
}
|