fix: keep order of object fields
This commit is contained in:
parent
005610ca40
commit
952a4d631d
@ -1,8 +1,8 @@
|
|||||||
package me.topchetoeu.jscript.engine.values;
|
package me.topchetoeu.jscript.engine.values;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -47,11 +47,11 @@ public class ObjectValue {
|
|||||||
protected Object prototype;
|
protected Object prototype;
|
||||||
|
|
||||||
public State state = State.NORMAL;
|
public State state = State.NORMAL;
|
||||||
public HashMap<Object, Object> values = new HashMap<>();
|
public LinkedHashMap<Object, Object> values = new LinkedHashMap<>();
|
||||||
public HashMap<Object, Property> properties = new HashMap<>();
|
public LinkedHashMap<Object, Property> properties = new LinkedHashMap<>();
|
||||||
public HashSet<Object> nonWritableSet = new HashSet<>();
|
public LinkedHashSet<Object> nonWritableSet = new LinkedHashSet<>();
|
||||||
public HashSet<Object> nonConfigurableSet = new HashSet<>();
|
public LinkedHashSet<Object> nonConfigurableSet = new LinkedHashSet<>();
|
||||||
public HashSet<Object> nonEnumerableSet = new HashSet<>();
|
public LinkedHashSet<Object> nonEnumerableSet = new LinkedHashSet<>();
|
||||||
|
|
||||||
public final boolean memberWritable(Object key) {
|
public final boolean memberWritable(Object key) {
|
||||||
if (state == State.FROZEN) return false;
|
if (state == State.FROZEN) return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user