mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-30 11:07:29 +09:00
Remove Unboxed Objects from vm/ Part 1 + fix deprot
This commit is contained in:
parent
96c56fa091
commit
37315e4898
6 changed files with 10 additions and 15 deletions
|
|
@ -15,9 +15,11 @@
|
||||||
#include "jit/JitcodeMap.h"
|
#include "jit/JitcodeMap.h"
|
||||||
#include "jit/JitSpewer.h"
|
#include "jit/JitSpewer.h"
|
||||||
#include "js/TrackedOptimizationInfo.h"
|
#include "js/TrackedOptimizationInfo.h"
|
||||||
|
#include "vm/UnboxedObject.h"
|
||||||
|
|
||||||
#include "vm/ObjectGroup-inl.h"
|
#include "vm/ObjectGroup-inl.h"
|
||||||
#include "vm/TypeInference-inl.h"
|
#include "vm/TypeInference-inl.h"
|
||||||
|
#include "vm/UnboxedObject-inl.h"
|
||||||
|
|
||||||
using namespace js;
|
using namespace js;
|
||||||
using namespace js::jit;
|
using namespace js::jit;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "jit/VMFunctions.h"
|
#include "jit/VMFunctions.h"
|
||||||
#include "vm/Interpreter.h"
|
#include "vm/Interpreter.h"
|
||||||
|
#include "vm/NativeObject-inl.h"
|
||||||
|
|
||||||
#include "jit/MacroAssembler-inl.h"
|
#include "jit/MacroAssembler-inl.h"
|
||||||
#include "vm/Interpreter-inl.h"
|
#include "vm/Interpreter-inl.h"
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
#include "vm/Caches-inl.h"
|
#include "vm/Caches-inl.h"
|
||||||
#include "vm/Interpreter-inl.h"
|
#include "vm/Interpreter-inl.h"
|
||||||
#include "vm/NativeObject-inl.h"
|
#include "vm/NativeObject-inl.h"
|
||||||
|
#include "vm/UnboxedObject-inl.h"
|
||||||
|
|
||||||
using namespace js;
|
using namespace js;
|
||||||
using namespace js::gc;
|
using namespace js::gc;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
#include "vm/RegExpStaticsObject.h"
|
#include "vm/RegExpStaticsObject.h"
|
||||||
#include "vm/Shape.h"
|
#include "vm/Shape.h"
|
||||||
#include "vm/TypedArrayCommon.h"
|
#include "vm/TypedArrayCommon.h"
|
||||||
|
#include "vm/UnboxedObject-inl.h"
|
||||||
|
|
||||||
#include "jsatominlines.h"
|
#include "jsatominlines.h"
|
||||||
#include "jsboolinlines.h"
|
#include "jsboolinlines.h"
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
#include "vm/EnvironmentObject-inl.h"
|
#include "vm/EnvironmentObject-inl.h"
|
||||||
#include "vm/Stack-inl.h"
|
#include "vm/Stack-inl.h"
|
||||||
#include "vm/String-inl.h"
|
#include "vm/String-inl.h"
|
||||||
#include "vm/UnboxedObject-inl.h"
|
|
||||||
|
|
||||||
namespace js {
|
namespace js {
|
||||||
|
|
||||||
|
|
@ -337,14 +336,10 @@ InitGlobalLexicalOperation(JSContext* cx, LexicalEnvironmentObject* lexicalEnvAr
|
||||||
inline bool
|
inline bool
|
||||||
InitPropertyOperation(JSContext* cx, JSOp op, HandleObject obj, HandleId id, HandleValue rhs)
|
InitPropertyOperation(JSContext* cx, JSOp op, HandleObject obj, HandleId id, HandleValue rhs)
|
||||||
{
|
{
|
||||||
if (obj->is<PlainObject>() || obj->is<JSFunction>()) {
|
MOZ_ASSERT(obj->is<PlainObject>() || obj->is<JSFunction>());
|
||||||
unsigned propAttrs = GetInitDataPropAttrs(op);
|
unsigned propAttrs = GetInitDataPropAttrs(op);
|
||||||
return NativeDefineProperty(cx, obj.as<NativeObject>(), id, rhs, nullptr, nullptr,
|
return NativeDefineProperty(cx, obj.as<NativeObject>(), id, rhs,
|
||||||
propAttrs);
|
nullptr, nullptr, propAttrs);
|
||||||
}
|
|
||||||
|
|
||||||
MOZ_ASSERT(obj->as<UnboxedPlainObject>().layout().lookup(id));
|
|
||||||
return PutProperty(cx, obj, id, rhs, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
|
|
|
||||||
|
|
@ -4111,7 +4111,7 @@ CASE(JSOP_INITHOMEOBJECT)
|
||||||
/* Load the home object */
|
/* Load the home object */
|
||||||
ReservedRooted<JSObject*> obj(&rootObject0);
|
ReservedRooted<JSObject*> obj(&rootObject0);
|
||||||
obj = ®S.sp[int(-2 - skipOver)].toObject();
|
obj = ®S.sp[int(-2 - skipOver)].toObject();
|
||||||
MOZ_ASSERT(obj->is<PlainObject>() || obj->is<UnboxedPlainObject>() || obj->is<JSFunction>());
|
MOZ_ASSERT(obj->is<PlainObject>() || obj->is<JSFunction>());
|
||||||
|
|
||||||
func->setExtendedSlot(FunctionExtended::METHOD_HOMEOBJECT_SLOT, ObjectValue(*obj));
|
func->setExtendedSlot(FunctionExtended::METHOD_HOMEOBJECT_SLOT, ObjectValue(*obj));
|
||||||
}
|
}
|
||||||
|
|
@ -4927,15 +4927,10 @@ js::NewObjectOperation(JSContext* cx, HandleScript script, jsbytecode* pc,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (group->maybePreliminaryObjects()) {
|
if (group->maybePreliminaryObjects()) {
|
||||||
group->maybePreliminaryObjects()->maybeAnalyze(cx, group);
|
group->maybePreliminaryObjects()->maybeAnalyze(cx, group);
|
||||||
if (group->maybeUnboxedLayout())
|
|
||||||
group->maybeUnboxedLayout()->setAllocationSite(script, pc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (group->shouldPreTenure() || group->maybePreliminaryObjects())
|
if (group->shouldPreTenure() || group->maybePreliminaryObjects())
|
||||||
newKind = TenuredObject;
|
newKind = TenuredObject;
|
||||||
|
|
||||||
if (group->maybeUnboxedLayout())
|
|
||||||
return UnboxedPlainObject::create(cx, group, newKind);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RootedObject obj(cx);
|
RootedObject obj(cx);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue