Skip to content

Commit

Permalink
Treat thread polls as variable visibility barriers.
Browse files Browse the repository at this point in the history
Fixes last remaining failure with test:mri:jit.
  • Loading branch information
headius committed Mar 11, 2015
1 parent 440c956 commit 09c29b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ matrix:
fast_finish: true
allow_failures:
- env: PHASE='-Prake -Dtask=spec:profiler'
- env: PHASE='-Prake -Dtask=test:mri:jit'

branches:
only:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ public void addLoads(Map<Operand, Operand> varRenameMap) {
}
it.previous();
}
} else if (scopeBindingHasEscaped && (i.getOperation() == Operation.PUT_GLOBAL_VAR)) {
// global-var tracing can execute closures set up in previous trace-var calls
// in which case we would have the 'scopeBindingHasEscaped' flag set to true
} else if (scopeBindingHasEscaped && (i.getOperation() == Operation.PUT_GLOBAL_VAR)
|| i.getOperation() == Operation.THREAD_POLL) {
// 1. Global-var tracing can execute closures set up in previous trace-var calls
// in which case we would have the 'scopeBindingHasEscaped' flag set to true.
// 2. Threads can update bindings, so we treat thread poll boundaries the same way.
it.next();
for (LocalVariable v : reqdLoads) {
it.add(new LoadLocalVarInstr(scope, getLocalVarReplacement(v, scope, varRenameMap), v));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,11 @@ public boolean addStores(Map<Operand, Operand> varRenameMap, Set<LocalVariable>
dirtyVars.clear();
}

if (scopeBindingHasEscaped && (i.getOperation() == Operation.PUT_GLOBAL_VAR)) {
// global-var tracing can execute closures set up in previous trace-var calls
// in which case we would have the 'scopeBindingHasEscaped' flag set to true
if (scopeBindingHasEscaped && (i.getOperation() == Operation.PUT_GLOBAL_VAR)
|| i.getOperation() == Operation.THREAD_POLL) {
// 1. Global-var tracing can execute closures set up in previous trace-var calls
// in which case we would have the 'scopeBindingHasEscaped' flag set to true.
// 2. Threads can update bindings, so we treat thread poll boundaries the same way.
instrs.previous();
for (LocalVariable v : dirtyVars) {
addedStores = true;
Expand Down

0 comments on commit 09c29b8

Please sign in to comment.