Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -44,8 +44,7 @@ public Object getName() {
@Specialization(
guards = {
"location != null",
"object.getShape() == cachedShape",
"location.canSet(object, value)"
"object.getShape() == cachedShape"
},
assumptions = { "newArray(cachedShape.getValidAssumption(), validLocation)" },
limit = "getCacheLimit()")
@@ -55,21 +54,18 @@ public void writeExistingField(DynamicObject object, Object value,
@Cached("createAssumption()") Assumption validLocation) {
try {
location.set(object, value, cachedShape);
} catch (IncompatibleLocationException e) {
} catch (IncompatibleLocationException | FinalLocationException e) {
// remove this entry
validLocation.invalidate();
execute(object, value);
} catch (FinalLocationException e) {
throw new UnsupportedOperationException("write to final location?", e);
}
}

@Specialization(
guards = {
"!hasField",
"newShape != null", // workaround for DSL bug
"object.getShape() == oldShape",
"location.canSet(object, value)" },
"object.getShape() == oldShape" },
assumptions = { "newArray(oldShape.getValidAssumption(), newShape.getValidAssumption(), validLocation)" },
limit = "getCacheLimit()")
public void writeNewField(DynamicObject object, Object value,

0 comments on commit 933d003

Please sign in to comment.