Closed Bug 599277 Opened 15 years ago Closed 15 years ago

Atom representation should move from AvmPlus into base layer so that MMgc can access it

Categories

(Tamarin Graveyard :: Virtual Machine, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Q3 11 - Serrano

People

(Reporter: lhansen, Assigned: lhansen)

References

Details

(Whiteboard: has-patch)

Attachments

(1 file, 4 obsolete files)

For the exact tracing work I would like MMgc to have knowledge of the atom representation of the AVM. (I could slice it differently by delegating the problem from MMgc back into the AVM, but the result is the same - a dependency. Exposing the atom representation seems like the smallest injection of dependency. I'm open to arguments against that.) MMgc would only use this information when tracing AVM objects that are specially marked as such, so it would not get in the way of using MMgc for other kinds of objects. Indeed, MMgc could support exact tracing of other kinds of atoms as well. When we compile for the avmshell the atom information is available through the magic of files already included in the environment; for the Flash Player some additional including is necessary, and this is why I'd like to make changes: If we don't segregate the atom representation from the rest of the AVM we risk having to pull in a varying amount of AVM header files into MMgc when MMgc is separately compiled by the Flash Player. I want to avoid that by clearly separating the atom representation into a base layer whose files are guaranteed to be independent of the AVM. Judging from preliminary work this is not going to be a large change. Right now the atoms are in various namespaces: avmplus::Atom, avmplus::AtomConstants::whatever. There are a couple of dependencies from atom-inlines.h into AvmCore, but I think those can be broken without too much trouble.
Attached patch Preliminary - for safe keeping (obsolete) — Splinter Review
Priority: -- → P3
Target Milestone: --- → flash10.x - Serrano
This will probably mean (see bug #591492): - Move atom.h, atom-inlines.h, atom.cpp into vmbase/ - #include "vmbase.h" from avmplus.h and MMgc.h - Break the dependency from ScriptObject* atomObj() by allowing it to reference an extern function provided by AvmCore in DEBUG builds, where the function is declared in atom.h.
Note: to test this with Xcode (ie test that the atom definitions aren't accidentally included through precompiled headers), it is necessary to apply this patch: diff --git a/build/avmshell-common.xcconfig b/build/avmshell-common.xcconfig --- a/build/avmshell-common.xcconfig +++ b/build/avmshell-common.xcconfig @@ -38,8 +38,8 @@ GCC_STRICT_ALIASING = YES GCC_ENABLE_CPP_EXCEPTIONS=NO GCC_ENABLE_CPP_RTTI=NO -GCC_PREFIX_HEADER = ../../../core/avmplus.h -GCC_PRECOMPILE_PREFIX_HEADER = YES +//GCC_PREFIX_HEADER = ../../../core/avmplus.h +GCC_PRECOMPILE_PREFIX_HEADER = NO // shell is included in this search path only for avmshell-features.h, included from platform/VMPI.h HEADER_SEARCH_PATHS=../../../core ../../../MMgc ../../../pcre ../../../extensions .. ../.. ../../../shell
Depends on: 591492
Attached patch Preliminary #2 (obsolete) — Splinter Review
This is probably roughly right. Ignore the changes to the build settings.
Attachment #479007 - Flags: review?(stejohns)
Here I've opted to keep atomObj with the atom code and create a dependency back to the core code by means of a forward declaration of class ScriptObject and a DEBUG-mode function for checking that the argument is valid. The alternative would be to keep atomObj in core, since its return value is a core type. (This is a large patch because of project file changes (Xcode, MSVC); the functional changes are very modest.)
Attachment #478266 - Attachment is obsolete: true
Attachment #478787 - Attachment is obsolete: true
Attachment #479008 - Flags: review?(stejohns)
Whiteboard: has-patch
Attachment #479007 - Flags: review?(stejohns) → review+
Comment on attachment 479008 [details] [diff] [review] Move the atom code from core to vmbase R+ on condition you run fixtabs before landing...
Attachment #479008 - Flags: review?(stejohns) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Backed out 31cb27e929bf because I've no time to fix flashruntime-redux.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch The revert patchSplinter Review
Attachment #479007 - Attachment is obsolete: true
Attachment #479008 - Attachment is obsolete: true
Tommy fixed the issues: changeset: 5303:587a4476e0ea changeset: 5301:bf24595d5b5d changeset: 5300:1f3798783da2 changeset: 5299:79323113e543
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Flags: flashplayer-bug-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: