avm2: Remove redundant traits parameter of VTable::init_vtable

This commit is contained in:
Lord-McSweeney 2024-09-02 11:32:39 -07:00 committed by Lord-McSweeney
parent 8d25be4639
commit 243c6b8ba5
5 changed files with 1 additions and 7 deletions

View File

@ -743,7 +743,6 @@ impl<'gc> Class<'gc> {
read.vtable.init_vtable(
self,
None,
&read.traits,
None,
read.super_class.map(|c| c.vtable()),
context.gc_context,

View File

@ -662,7 +662,6 @@ pub fn load_player_globals<'gc>(
global_obj_vtable.init_vtable(
global_classdef,
Some(object_class),
&global_classdef.traits(),
Some(scope),
Some(object_class.instance_vtable()),
mc,

View File

@ -211,7 +211,6 @@ impl<'gc> ClassObject<'gc> {
self.instance_vtable().init_vtable(
class,
self.superclass_object(),
&class.traits(),
Some(self.instance_scope()),
self.superclass_object().map(|cls| cls.instance_vtable()),
activation.context.gc_context,
@ -254,7 +253,6 @@ impl<'gc> ClassObject<'gc> {
class_vtable.init_vtable(
c_class,
Some(class_classobject),
&c_class.traits(),
Some(self.class_scope()),
Some(class_classobject.instance_vtable()),
activation.context.gc_context,

View File

@ -553,7 +553,6 @@ impl<'gc> Script<'gc> {
global_obj_vtable.init_vtable(
global_class,
Some(object_class),
&global_class.traits(),
Some(scope),
Some(object_class.instance_vtable()),
mc,

View File

@ -212,7 +212,6 @@ impl<'gc> VTable<'gc> {
self,
defining_class_def: Class<'gc>,
super_class_obj: Option<ClassObject<'gc>>,
traits: &[Trait<'gc>],
scope: Option<ScopeChain<'gc>>,
superclass_vtable: Option<Self>,
mc: &Mutation<'gc>,
@ -316,7 +315,7 @@ impl<'gc> VTable<'gc> {
&mut write.slot_classes,
);
for trait_data in traits {
for trait_data in &*defining_class_def.traits() {
match trait_data.kind() {
TraitKind::Method { method, .. } => {
let entry = ClassBoundMethod {