Closed Bug 618852 Opened 14 years ago Closed 6 years ago

Add tools support for the "float" type

Categories

(Tamarin Graveyard :: Tools, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX
Q2 12 - Cyril

People

(Reporter: awelc, Unassigned)

References

Details

(Whiteboard: Tracking)

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
Build Identifier: 

Modifications to the existing tools (abcasm, abcdump) are required to support the "float" type.

Reproducible: Always
Assignee: nobody → awelc
Flags: flashplayer-qrb+
Flags: flashplayer-bug-
Priority: -- → P4
Target Milestone: --- → flash10.x-Serrano
Flags: flashplayer-injection-
Target Milestone: Q3 11 - Serrano → Q1 12 - Brannan
This is mostly Adam's implementation, that was slightly changed/updated by me. Needs a review to make sure it is in sync with the latest spec.
Target Milestone: Q1 12 - Brannan → Q2 12 - Cyril
I think this could even land... if it weren't for two issues :)
1. opcodes-table.as is autogenerated from opcodes.tbl, so landing it would make it out-of-sync with current (mainline) opcodes.tbl
2. I think that the "magic number" (ABC version) that enables float support might change from 47|15 to 47|16, right?
Attachment #532993 - Attachment is obsolete: true
Attachment #560873 - Flags: review?(lhansen)
Oops, forgot to add a file to the patch (Float4.java).
Attachment #560873 - Attachment is obsolete: true
Attachment #560874 - Flags: review?(lhansen)
Attachment #560873 - Flags: review?(lhansen)
Comment on attachment 560874 [details] [diff] [review]
implementation for float&float4 in abcdump, abcasm

The patch is mostly fine.

Major objection: This can't land until we've signed off on the ABC extensions spec (it's a little unclear who "we" are but you could assume myself and Edwin).  That spec was last updated on 7 July and looks anything but complete, in particular there's no mention of a float4 pool, no unminus instruction, etc.  Cleaning it up presumably won't be a major effort but is a prerequisite.

We cannot merge the test cases into arithmetic.abs like you have here, since the new test cases are only for new ABC versions and we may have to version the behavior generally speaking as we change ABC versions.  I suggest you move the new test cases into a file called eg arithmetic_47_16.abs to indicate tests that become introduced in that version (and a comment to that effect in the file will be helpful).

The test cases offered here are certainly insufficient, so we need to open a separate bug to flesh out the test cases for the new VM behavior.  This bug can block that one; that bug blocks the float work.

As you say, the version number needs to be 47.16 not 47.15 everywhere.

Style: Prevailing style for Java and AS3 code is indenting four spaces (Float4.java, abcdump.as).

Style: This condition nest in abcdump.as is a mess and has to be rewritten:

  if (magic != (46<<16|14) && magic != (46<<16|15) && magic != (46<<16|16) && magic != (47<<16|12)
              && magic != (47<<16|13)  && magic != (47<<16|14)  && magic != (47<<16|15))

Nit: it's not desirable to put jar files in the patch for review, at most it should be attached as separate non-reviewed patch.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Virgil Palanciuc from comment #2)

> 1. opcodes-table.as is autogenerated from opcodes.tbl, so landing it would
> make it out-of-sync with current (mainline) opcodes.tbl

Yes.  But once the ABC extensions spec is done, can we not land opcodes.tbl before we land everything else, so that we can land the abcasm/abcdump changes too?  These are all new opcodes so no content uses them, the verifier rejects them, etc - will we go wrong anywhere?

In opcodes.tbl we would want to have comments on all of the new instructions about the version in which they were introduced.
Comment on attachment 560874 [details] [diff] [review]
implementation for float&float4 in abcdump, abcasm

R- for the test cases, by and large, and for the incorrect version number.

Also missing prerequisites: ABC extensions spec; opcodes.tbl update.
Attachment #560874 - Flags: review?(lhansen) → review-
These comments are relative to the patch in the patch queue as of 28 October.

- abcasm needs to accept the 'F' suffix as well as the 'f' suffix

- It would be good to have one test case for the 'F' suffix

- It should be possible to force abcasm to emit 47.16 bytecode even if the
  program does not use float, this will be handy for testing.  In fact it
  should be possible to ask for /any/ version number, in order to do testing;
  all abcasm needs to do is emit the right sections depending on the version
  number.  A command line switch and a little logic will do.  It may be
  adequate to fix that as a follow-on patch to the one we already have, but
  it does need to be fixed eventually.

(Consider this an R+ for the patch; the above are niggly details.)
Assignee: awelc → nobody
Priority: P4 → P3
Whiteboard: Tracking
Priority: P3 → --
Tamarin is a dead project now. Mass WONTFIX.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: