Field init_scope_depth in structure method_body_info is only used trivially.

NEW
Unassigned

Status

Tamarin
Documentation
7 years ago
7 years ago

People

(Reporter: Edwin Smith, Unassigned)

Tracking

Details

(Reporter)

Description

7 years ago
from avm2overview.doc

[Lars wrote] 
It appears that the idea here is that init_scope_depth gives the size of the scope stack over which the method has closed, ie, the number of scopes outside the function.

However, the AVM does not use this information for that purpose, it only uses it to compute the size of the actual local scope stack as the difference between max_scope_depth and init_scope_depth.  In other words, it appears that setting this field to 0 always has no negative consequences.

edwsmith confirms this and suggests this field be removed in future abcfile formats.
You need to log in before you can comment on or make changes to this bug.