зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1548903 - Remove unused JS TypeInference methods. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D29865 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6678ca2e42
Коммит
d14b20c96c
|
@ -399,7 +399,6 @@ class ObjectGroup : public gc::TenuredCell {
|
|||
void updateNewPropertyTypes(const AutoSweepObjectGroup& sweep, JSContext* cx,
|
||||
JSObject* obj, jsid id, HeapTypeSet* types);
|
||||
void addDefiniteProperties(JSContext* cx, Shape* shape);
|
||||
bool matchDefiniteProperties(HandleObject obj);
|
||||
void markPropertyNonData(JSContext* cx, JSObject* obj, jsid id);
|
||||
void markPropertyNonWritable(JSContext* cx, JSObject* obj, jsid id);
|
||||
void markStateChange(const AutoSweepObjectGroup& sweep, JSContext* cx);
|
||||
|
|
|
@ -351,9 +351,6 @@ class TypeNewScript {
|
|||
bool rollbackPartiallyInitializedObjects(JSContext* cx, ObjectGroup* group);
|
||||
|
||||
static bool make(JSContext* cx, ObjectGroup* group, JSFunction* fun);
|
||||
static TypeNewScript* makeNativeVersion(JSContext* cx,
|
||||
TypeNewScript* newScript,
|
||||
PlainObject* templateObject);
|
||||
|
||||
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
|
||||
|
@ -435,8 +432,6 @@ struct MOZ_RAII AutoEnterAnalysis {
|
|||
// Interface functions
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
void MarkIteratorUnknownSlow(JSContext* cx);
|
||||
|
||||
void TypeMonitorCallSlow(JSContext* cx, JSObject* callee, const CallArgs& args,
|
||||
bool constructing);
|
||||
|
||||
|
|
|
@ -2874,35 +2874,6 @@ void ObjectGroup::addDefiniteProperties(JSContext* cx, Shape* shape) {
|
|||
}
|
||||
}
|
||||
|
||||
bool ObjectGroup::matchDefiniteProperties(HandleObject obj) {
|
||||
AutoSweepObjectGroup sweep(this);
|
||||
unsigned count = getPropertyCount(sweep);
|
||||
for (unsigned i = 0; i < count; i++) {
|
||||
Property* prop = getProperty(sweep, i);
|
||||
if (!prop) {
|
||||
continue;
|
||||
}
|
||||
if (prop->types.definiteProperty()) {
|
||||
unsigned slot = prop->types.definiteSlot();
|
||||
|
||||
bool found = false;
|
||||
Shape* shape = obj->as<NativeObject>().lastProperty();
|
||||
while (!shape->isEmptyShape()) {
|
||||
if (shape->slot() == slot && shape->propid() == prop->id) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
shape = shape->previous();
|
||||
}
|
||||
if (!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void js::AddTypePropertyId(JSContext* cx, ObjectGroup* group, JSObject* obj,
|
||||
jsid id, TypeSet::Type type) {
|
||||
MOZ_ASSERT(id == IdToTypeId(id));
|
||||
|
@ -3803,41 +3774,6 @@ bool TypeNewScript::make(JSContext* cx, ObjectGroup* group, JSFunction* fun) {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Make a TypeNewScript with the same initializer list as |newScript| but with
|
||||
// a new template object.
|
||||
/* static */
|
||||
TypeNewScript* TypeNewScript::makeNativeVersion(JSContext* cx,
|
||||
TypeNewScript* newScript,
|
||||
PlainObject* templateObject) {
|
||||
MOZ_RELEASE_ASSERT(cx->zone()->types.activeAnalysis);
|
||||
|
||||
auto nativeNewScript = cx->make_unique<TypeNewScript>();
|
||||
if (!nativeNewScript) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nativeNewScript->function_ = newScript->function();
|
||||
nativeNewScript->templateObject_ = templateObject;
|
||||
|
||||
TypeNewScriptInitializer* cursor = newScript->initializerList;
|
||||
while (cursor->kind != TypeNewScriptInitializer::DONE) {
|
||||
cursor++;
|
||||
}
|
||||
|
||||
size_t initializerLength = cursor - newScript->initializerList + 1;
|
||||
|
||||
nativeNewScript->initializerList =
|
||||
cx->pod_calloc<TypeNewScriptInitializer>(initializerLength);
|
||||
if (!nativeNewScript->initializerList) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PodCopy(nativeNewScript->initializerList, newScript->initializerList,
|
||||
initializerLength);
|
||||
|
||||
return nativeNewScript.release();
|
||||
}
|
||||
|
||||
size_t TypeNewScript::sizeOfIncludingThis(
|
||||
mozilla::MallocSizeOf mallocSizeOf) const {
|
||||
size_t n = mallocSizeOf(this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче