Search in sources :

Example 31 with Property

use of com.oracle.truffle.api.object.Property in project graal by oracle.

the class SLReadPropertyCacheNode method lookupLocation.

protected Location lookupLocation(Shape shape, Object name) {
    /* Initialization of cached values always happens in a slow path. */
    CompilerAsserts.neverPartOfCompilation();
    Property property = shape.getProperty(name);
    if (property == null) {
        /* Property does not exist. */
        throw SLUndefinedNameException.undefinedProperty(this, name);
    }
    return property.getLocation();
}
Also used : Property(com.oracle.truffle.api.object.Property)

Aggregations

Property (com.oracle.truffle.api.object.Property)31 DynamicObject (com.oracle.truffle.api.object.DynamicObject)8 Test (org.junit.Test)7 TruffleBoundary (com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)6 IncompatibleLocationException (com.oracle.truffle.api.object.IncompatibleLocationException)4 Location (com.oracle.truffle.api.object.Location)4 ArrayDeque (java.util.ArrayDeque)3 FinalLocationException (com.oracle.truffle.api.object.FinalLocationException)2 ObjectLocation (com.oracle.truffle.api.object.ObjectLocation)2 DeclaredLocation (com.oracle.truffle.object.Locations.DeclaredLocation)2 Layout (com.oracle.truffle.api.object.Layout)1 Shape (com.oracle.truffle.api.object.Shape)1 ValueLocation (com.oracle.truffle.object.Locations.ValueLocation)1 PropertyMap (com.oracle.truffle.object.PropertyMap)1 LinkedHashMap (java.util.LinkedHashMap)1 Random (java.util.Random)1