aboutsummaryrefslogtreecommitdiff
path: root/src/jdk/nashorn/internal/lookup
diff options
context:
space:
mode:
authorsundar <none@none>2013-07-08 16:33:50 +0530
committersundar <none@none>2013-07-08 16:33:50 +0530
commit6ec29ee4fe897f1a32e1508155b588209a17794c (patch)
tree197d5402bdc22b8a7b5abd7d7eab1444946f6c0f /src/jdk/nashorn/internal/lookup
parentc929d91bce6bc017c6319f11a6eb7b8296fb4c22 (diff)
downloadjdk8u_nashorn-6ec29ee4fe897f1a32e1508155b588209a17794c.tar.gz
8020015: shared PropertyMaps should not be used without duplication
Reviewed-by: hannesw, attila
Diffstat (limited to 'src/jdk/nashorn/internal/lookup')
-rw-r--r--src/jdk/nashorn/internal/lookup/Lookup.java38
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