diff options
Diffstat (limited to 'src/jdk/nashorn/internal/lookup')
-rw-r--r-- | src/jdk/nashorn/internal/lookup/Lookup.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/jdk/nashorn/internal/lookup/Lookup.java b/src/jdk/nashorn/internal/lookup/Lookup.java index a454527a..e874cfd7 100644 --- a/src/jdk/nashorn/internal/lookup/Lookup.java +++ b/src/jdk/nashorn/internal/lookup/Lookup.java @@ -125,44 +125,6 @@ public final class Lookup { } /** - * Create a new {@link Property} - * - * @param map property map - * @param key property key - * @param flags property flags - * @param propertyGetter getter for property if available, null otherwise - * @param propertySetter setter for property if available, null otherwise - * - * @return new property map, representing {@code PropertyMap} with the new property added to it - */ - @SuppressWarnings("fallthrough") - public static PropertyMap newProperty(final PropertyMap map, final String key, final int flags, final MethodHandle propertyGetter, final MethodHandle propertySetter) { - MethodHandle getter = propertyGetter; - MethodHandle setter = propertySetter; - - // TODO: this is temporary code. This code exists to support reflective - // field reader/writer handles generated by "unreflect" lookup. - - switch (getter.type().parameterCount()) { - case 0: - // A static field reader, so drop the 'self' argument. - getter = MH.dropArguments(getter, 0, Object.class); - if (setter != null) { - setter = MH.dropArguments(setter, 0, Object.class); - } - // fall through - case 1: - // standard getter that accepts 'self'. - break; - default: - // Huh!! something wrong.. - throw new IllegalArgumentException("getter/setter has wrong arguments"); - } - - return map.newProperty(key, flags, -1, getter, setter); - } - - /** * This method filters primitive return types using JavaScript semantics. For example, * an (int) cast of a double in Java land is not the same thing as invoking toInt32 on it. * If you are returning values to JavaScript that have to be of a specific type, this is |