src/jdk/nashorn/internal/runtime/Property.java
Print this page
*** 85,94 ****
--- 85,97 ----
public static final int CAN_BE_UNDEFINED = 1 << 8;
/* Is this a function declaration property ? */
public static final int IS_FUNCTION_DECLARATION = 1 << 9;
+ /* Is this property bound bound to a receiver? */
+ public static final int IS_BOUND = 1 << 10;
+
/** Property key. */
private final String key;
/** Property flags. */
protected int flags;
*** 250,259 ****
--- 253,271 ----
public boolean isSpill() {
return (flags & IS_SPILL) == IS_SPILL;
}
/**
+ * Is this property bound to a receiver?
+ *
+ * @return true if this is a bound property
+ */
+ public boolean isBound() {
+ return (flags & IS_BOUND) == IS_BOUND;
+ }
+
+ /**
* Does this property use any slots in the spill array described in
* {@link Property#isSpill}? In that case how many. Currently a property
* only uses max one spill slot, but this may change in future representations
* Only {@link AccessorProperty} instances use spill slots
*