Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/access/SLReadPropertyCacheNode.java @ 22338:15c9dda91e50
SL: simplify write property cache node
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Fri, 30 Oct 2015 19:11:36 +0100 |
parents | dc83cc1f94f2 |
children | 6546703e0c76 |
comparison
equal
deleted
inserted
replaced
22337:4f3eda22dbe9 | 22338:15c9dda91e50 |
---|---|
71 | 71 |
72 /* | 72 /* |
73 * We use a separate long specialization to avoid boxing for long. | 73 * We use a separate long specialization to avoid boxing for long. |
74 */ | 74 */ |
75 @Specialization(limit = "CACHE_LIMIT", guards = {"longLocation != null", "shape.check(receiver)"}, assumptions = "shape.getValidAssumption()") | 75 @Specialization(limit = "CACHE_LIMIT", guards = {"longLocation != null", "shape.check(receiver)"}, assumptions = "shape.getValidAssumption()") |
76 @SuppressWarnings("unused") | |
77 protected long doCachedLong(DynamicObject receiver, // | 76 protected long doCachedLong(DynamicObject receiver, // |
78 @Cached("receiver.getShape()") Shape shape, // | 77 @Cached("receiver.getShape()") Shape shape, // |
79 @Cached("getLongLocation(shape)") LongLocation longLocation) { | 78 @Cached("getLongLocation(shape)") LongLocation longLocation) { |
80 return longLocation.getLong(receiver, true); | 79 return longLocation.getLong(receiver, shape); |
81 } | 80 } |
82 | 81 |
83 protected LongLocation getLongLocation(Shape shape) { | 82 protected LongLocation getLongLocation(Shape shape) { |
84 Property property = shape.getProperty(propertyName); | 83 Property property = shape.getProperty(propertyName); |
85 if (property != null && property.getLocation() instanceof LongLocation) { | 84 if (property != null && property.getLocation() instanceof LongLocation) { |