src/jdk/nashorn/internal/codegen/objects/ObjectCreator.java

Print this page

        

@@ -125,19 +125,20 @@
         return new MapCreator(clazz, keys, symbols);
     }
 
     /**
      * Construct the property map appropriate for the object.
+     * @return the newly created property map
      */
-    protected void makeMap() {
+    protected PropertyMap makeMap() {
         if (keys.isEmpty()) { //empty map
             propertyMap = PropertyMap.newMap(fieldObjectClass);
-            return;
-        }
-
+        } else {
         propertyMap = newMapCreator(fieldObjectClass).makeMap(isVarArg());
     }
+        return propertyMap;
+    }
 
     /**
      * Emit the correct map for the object.
      * @param method method emitter
      * @return the method emitter