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

Print this page

        

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