Consider global code like this:
initStuff()
initMoreStuffA()
initMoreStuffB()
Assume that initMoreStuffA() and initMoreStuffB have the following properties:
initStuffinitMoreStuffA does not read or write any heap location that initMoreStuffB writes to, and the other way around.It seems that we should be able to detect the 2. property.
Now assume that the global code changes, so that initMoreStuffA and initMoreStuffB don't actually run as part of the global code, but get invoked conditionally. We should be able to prepack the two functions separately, and serialize code for them that patches the heap appropriately.
This looks great. For our use-case specifically, A and B will be independent but may be writing to shared parts of the heap.
functon initStuff() {
global.registry = {};
}
function initMoreStuffA() {
global.registry['A'] = 'a';
}
function initMoreStuffB() {
global.registry['B'] = 'b';
}
Another property that would hold true for this is that.
initStuff()
initMoreStuffB()
initMoreStuffA()
will result in the same heap layout as the original.
I'll take on the bits needed for checking that initMoreStuffA and initMoreStuffB are independent from each other.
Decomposing the overall required work:
3 by itself seems to be a very useful feature, and should be strictly easier than 4.
Still open is #987.
Recently new issues surfaced and are still open: #1250 and #1238 and #1140 and #1093.
Bugs still open are:
New feature requests:
Bugs still open are:
New feature requests:
I think the goals specified in this PR are mostly achieved. Additionally, this specific use case is no longer needed, so I'm closing this task.
Most helpful comment
This looks great. For our use-case specifically, A and B will be independent but may be writing to shared parts of the heap.
Another property that would hold true for this is that.
will result in the same heap layout as the original.