Rename super_() to superType() for better consistency.

This commit is contained in:
Mark Shannon
2019-05-09 14:47:12 +01:00
parent d44ce4f1df
commit 92d0aef6f4
3 changed files with 5 additions and 5 deletions

View File

@@ -368,7 +368,7 @@ class SuperInstance extends TSuperInstance, ObjectInternal {
override boolean isClass() { result = false }
override ObjectInternal getClass() {
result = ObjectInternal::super_()
result = ObjectInternal::superType()
}
override boolean isComparable() { result = false }

View File

@@ -418,7 +418,7 @@ module ObjectInternal {
result = TBuiltinClassObject(Builtin::special("property"))
}
ObjectInternal super_() {
ObjectInternal superType() {
result = TBuiltinClassObject(Builtin::special("super"))
}

View File

@@ -121,7 +121,7 @@ newtype TObject =
}
or
TUnknownInstance(BuiltinClassObjectInternal cls) {
cls != ObjectInternal::super_() and
cls != ObjectInternal::superType() and
cls != ObjectInternal::builtin("bool") and
cls != ObjectInternal::noneType()
}
@@ -208,7 +208,7 @@ pragma [noinline]
private predicate super_call2(CallNode call, ControlFlowNode arg0, ControlFlowNode arg1, PointsToContext context) {
exists(ControlFlowNode func |
call2(call, func, arg0, arg1) and
PointsToInternal::pointsTo(func, context, ObjectInternal::super_(), _)
PointsToInternal::pointsTo(func, context, ObjectInternal::superType(), _)
)
}
@@ -238,7 +238,7 @@ predicate method_binding(AttrNode instantiation, ObjectInternal self, CallableOb
receiver(instantiation, context, obj, name) |
exists(ObjectInternal cls |
cls = obj.getClass() and
cls != ObjectInternal::super_() and
cls != ObjectInternal::superType() and
cls.attribute(name, function, _) and
self = obj
)