search for: gc_new_array

Displaying 2 results from an estimated 2 matches for "gc_new_array".

Did you mean: _new_array
2016 Aug 29
2
invariant.load metadata semantics
Sanjoy, can you clarify this bit about JVM array lengths? Presumably the same pointer can point to two arrays of different lengths during a program's execution. Does this mean that you're relying on invariant.load having function scope? That is, correctness depends on the pointer not being reused for an array of a different length between the first invariant load of that array length in
2016 Aug 29
2
invariant.load metadata semantics
...other way to look at this is, the GC provides an illusion of an > infinitely large heap, where every "new" returns a new distinct > reference. For instance, in cases like: > > void do_something(array_t* a); > > void f(array_t* a) { > do_something(a); > array_t* b = gc_new_array(...); > boolean c = (a == b); > } > > `c` is *always* false. Since we have a use of `a` when computing `c`, > it _cannot_ have gone away at the point of the comparison[0]. > >> This seems like a very weak form of invariance. For example, when you >> inline, you would h...