nashorn/src/jdk/nashorn/internal/objects/DataPropertyDescriptor.java
changeset 18851 bdb92c95f886
parent 18618 136279c4cbe6
child 23083 8c74590d5df1
equal deleted inserted replaced
18850:e53ea5f14dd3 18851:bdb92c95f886
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package jdk.nashorn.internal.objects;
    26 package jdk.nashorn.internal.objects;
    27 
    27 
    28 import static jdk.nashorn.internal.runtime.ScriptRuntime.UNDEFINED;
       
    29 import static jdk.nashorn.internal.runtime.ScriptRuntime.sameValue;
    28 import static jdk.nashorn.internal.runtime.ScriptRuntime.sameValue;
    30 
    29 
    31 import java.util.Objects;
    30 import java.util.Objects;
    32 import jdk.nashorn.internal.objects.annotations.Property;
    31 import jdk.nashorn.internal.objects.annotations.Property;
    33 import jdk.nashorn.internal.objects.annotations.ScriptClass;
    32 import jdk.nashorn.internal.objects.annotations.ScriptClass;
    63     public Object value;
    62     public Object value;
    64 
    63 
    65     // initialized by nasgen
    64     // initialized by nasgen
    66     private static PropertyMap $nasgenmap$;
    65     private static PropertyMap $nasgenmap$;
    67 
    66 
    68     DataPropertyDescriptor() {
    67     static PropertyMap getInitialMap() {
    69         this(false, false, false, UNDEFINED);
    68         return $nasgenmap$;
    70     }
    69     }
    71 
    70 
    72     DataPropertyDescriptor(final boolean configurable, final boolean enumerable, final boolean writable, final Object value) {
    71     DataPropertyDescriptor(final boolean configurable, final boolean enumerable, final boolean writable, final Object value, final Global global) {
    73         super(Global.objectPrototype(), $nasgenmap$);
    72         super(global.getObjectPrototype(), global.getDataPropertyDescriptorMap());
    74         this.configurable = configurable;
    73         this.configurable = configurable;
    75         this.enumerable   = enumerable;
    74         this.enumerable   = enumerable;
    76         this.writable     = writable;
    75         this.writable     = writable;
    77         this.value        = value;
    76         this.value        = value;
    78     }
    77     }