Task #10

Quick Function Overlap Test

Added by Anonymous 859 days ago. Updated 807 days ago.

Status:Assigned Start:01/11/2010
Priority:Low Due date:
Assigned to:FX % Done:

90%

Category:-
Target version:BHUSA Estimated time:4.00 hours

Description

Instead of assigning every instruction to exactly one function (source:trunk/Blitzableiter/SWF/AVM1/AVM1Code.cs@3#L222), the same result should be achievable with only testing the byte range of function declarations. For a given block of AVM1 code, any byte within this block may only be part of exactly one function.

This test is only valid if performed after branch target verification.

The purpose of this change is primarily a performance improvement for regular SWFFile.Verify() calls. The full function mapping code will stay for access to AVM1Code.Functions.

History

Updated by FX 859 days ago

  • Status changed from New to Assigned

Updated by FX 843 days ago

  • Priority changed from Normal to Low
  • Target version set to BHUSA

Not sure if this performance improvement is required. It appears to be not so much better compared to the current (and more thorough implementation), considered that we are not holding byte chunks of code but actual indexed code, where we would need to calculate the byte offsets again.

Besides, it's just performance.

Updated by FX 807 days ago

  • % Done changed from 0 to 90
Revision r52 implements AVM1Code.FunctionInstructionMapTest(), which implements the following algorithm:
  1. Find begin and end of every function within a code block
  2. Ensure the functions are not or completely overlapping

Due to the way function declarations work in AVM1, this test should already be sufficient.

Unfortunately, it does not improve performance as much as hoped for.

Needs some more test cases.

Also available in: Atom PDF