mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 921902 - Fix --disable-ion builds.
This commit is contained in:
parent
7f9aa3fbae
commit
0f56ed8f08
@ -544,7 +544,11 @@ TypeSet::unionSets(TypeSet *a, TypeSet *b, LifoAlloc *alloc)
|
||||
// discarded.
|
||||
|
||||
static LifoAlloc *IonAlloc() {
|
||||
#ifdef JS_ION
|
||||
return jit::GetIonContext()->temp->lifoAlloc();
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Superclass of all constraints generated during Ion compilation. These may
|
||||
@ -575,8 +579,12 @@ class types::CompilerConstraint
|
||||
void
|
||||
CompilerConstraintList::add(CompilerConstraint *constraint)
|
||||
{
|
||||
#ifdef JS_ION
|
||||
if (!constraint || !constraint->expected || !constraints.append(constraint))
|
||||
setFailed();
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace {
|
||||
@ -672,16 +680,21 @@ TypeObjectKey::newScript()
|
||||
bool
|
||||
TypeObjectKey::unknownProperties()
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JSContext *cx = jit::GetIonContext()->cx;
|
||||
TypeObject *type = isSingleObject() ? asSingleObject()->getType(cx) : asTypeObject();
|
||||
if (!type)
|
||||
MOZ_CRASH();
|
||||
return type->unknownProperties();
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
HeapTypeSetKey
|
||||
TypeObjectKey::property(jsid id)
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JSContext *cx = jit::GetIonContext()->cx;
|
||||
TypeObject *type = isSingleObject() ? asSingleObject()->getType(cx) : asTypeObject();
|
||||
if (!type)
|
||||
@ -691,6 +704,9 @@ TypeObjectKey::property(jsid id)
|
||||
if (!property.actualTypes)
|
||||
MOZ_CRASH();
|
||||
return property;
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
@ -938,6 +954,7 @@ class ConstraintDataFreezeObjectFlags
|
||||
bool
|
||||
TypeObjectKey::hasFlags(CompilerConstraintList *constraints, TypeObjectFlags flags)
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(flags);
|
||||
|
||||
JSContext *cx = jit::GetIonContext()->cx;
|
||||
@ -950,6 +967,9 @@ TypeObjectKey::hasFlags(CompilerConstraintList *constraints, TypeObjectFlags fla
|
||||
HeapTypeSetKey objectProperty = property(JSID_EMPTY);
|
||||
constraints->add(IonAlloc()->new_<CompilerConstraintInstance<ConstraintDataFreezeObjectFlags> >(objectProperty, ConstraintDataFreezeObjectFlags(this, flags)));
|
||||
return false;
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -1653,11 +1673,15 @@ bool
|
||||
types::ArrayPrototypeHasIndexedProperty(CompilerConstraintList *constraints,
|
||||
HandleScript script)
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JSObject *proto = script->global().getOrCreateArrayPrototype(jit::GetIonContext()->cx);
|
||||
if (!proto)
|
||||
return true;
|
||||
|
||||
return PrototypeHasIndexedProperty(constraints, proto);
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -1402,8 +1402,10 @@ FinishCompilation(JSContext *cx, JSScript *script, jit::ExecutionMode executionM
|
||||
class CompilerConstraint;
|
||||
class CompilerConstraintList
|
||||
{
|
||||
#ifdef JS_ION
|
||||
// Generated constraints.
|
||||
Vector<CompilerConstraint *, 0, jit::IonAllocPolicy> constraints;
|
||||
#endif
|
||||
|
||||
// OOM during generation of some constraint.
|
||||
bool failed_;
|
||||
@ -1416,10 +1418,18 @@ class CompilerConstraintList
|
||||
void add(CompilerConstraint *constraint);
|
||||
|
||||
size_t length() {
|
||||
#ifdef JS_ION
|
||||
return constraints.length();
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
CompilerConstraint *get(size_t i) {
|
||||
#ifdef JS_ION
|
||||
return constraints[i];
|
||||
#else
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool failed() {
|
||||
|
Loading…
Reference in New Issue
Block a user