diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-23 19:43:47 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:57:32 +0200 |
commit | 0d1eea2ebfcf1a3746ff0125a6fa340e8b90d722 (patch) | |
tree | cd1dce30531ccb536236df99746b368895c66576 /js/src/vm/Interpreter-inl.h | |
parent | af69cb07db0d810a1a1a507b890e6beb23dc421c (diff) | |
download | UXP-0d1eea2ebfcf1a3746ff0125a6fa340e8b90d722.tar UXP-0d1eea2ebfcf1a3746ff0125a6fa340e8b90d722.tar.gz UXP-0d1eea2ebfcf1a3746ff0125a6fa340e8b90d722.tar.lz UXP-0d1eea2ebfcf1a3746ff0125a6fa340e8b90d722.tar.xz UXP-0d1eea2ebfcf1a3746ff0125a6fa340e8b90d722.zip |
Revert #1091 Remove unboxed object code phase 1 + extras.
This should be the last code backout for this. merging this branch
should get us back to the way we were (+ additional code changes for
later changes) as fasr as the unused unboxed code is concerned.
Diffstat (limited to 'js/src/vm/Interpreter-inl.h')
-rw-r--r-- | js/src/vm/Interpreter-inl.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/js/src/vm/Interpreter-inl.h b/js/src/vm/Interpreter-inl.h index adefa6e93..0e81dfef4 100644 --- a/js/src/vm/Interpreter-inl.h +++ b/js/src/vm/Interpreter-inl.h @@ -22,6 +22,7 @@ #include "vm/EnvironmentObject-inl.h" #include "vm/Stack-inl.h" #include "vm/String-inl.h" +#include "vm/UnboxedObject-inl.h" namespace js { @@ -336,10 +337,14 @@ InitGlobalLexicalOperation(JSContext* cx, LexicalEnvironmentObject* lexicalEnvAr inline bool InitPropertyOperation(JSContext* cx, JSOp op, HandleObject obj, HandleId id, HandleValue rhs) { - MOZ_ASSERT(obj->is<PlainObject>() || obj->is<JSFunction>()); - unsigned propAttrs = GetInitDataPropAttrs(op); - return NativeDefineProperty(cx, obj.as<NativeObject>(), id, rhs, - nullptr, nullptr, propAttrs); + if (obj->is<PlainObject>() || obj->is<JSFunction>()) { + unsigned propAttrs = GetInitDataPropAttrs(op); + return NativeDefineProperty(cx, obj.as<NativeObject>(), id, rhs, nullptr, nullptr, + propAttrs); + } + + MOZ_ASSERT(obj->as<UnboxedPlainObject>().layout().lookup(id)); + return PutProperty(cx, obj, id, rhs, false); } inline bool |