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)
Tamarin Graveyard
Virtual Machine
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: lhansen, Assigned: lhansen)
References
Details
(Whiteboard: has-patch)
Attachments
(1 file, 4 obsolete files)
|
53.36 KB,
patch
|
Details | Diff | Splinter Review |
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.
| Assignee | ||
Comment 1•15 years ago
|
||
| Assignee | ||
Updated•15 years ago
|
Priority: -- → P3
Target Milestone: --- → flash10.x - Serrano
| Assignee | ||
Comment 2•15 years ago
|
||
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.
| Assignee | ||
Comment 3•15 years ago
|
||
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
| Assignee | ||
Comment 4•15 years ago
|
||
This is probably roughly right. Ignore the changes to the build settings.
| Assignee | ||
Comment 5•15 years ago
|
||
Attachment #479007 -
Flags: review?(stejohns)
| Assignee | ||
Comment 6•15 years ago
|
||
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)
| Assignee | ||
Updated•15 years ago
|
Whiteboard: has-patch
Updated•15 years ago
|
Attachment #479007 -
Flags: review?(stejohns) → review+
Comment 7•15 years ago
|
||
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+
| Assignee | ||
Comment 8•15 years ago
|
||
tamarin-redux changeset: 5290:e5f0cb5885bf (merge)
tamarin-redux changeset: 5286:31cb27e929bf (move atoms)
tamarin-redux changeset: 5285:2511d3c10de7 (vmbase-inlines.h)
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 9•15 years ago
|
||
Backed out 31cb27e929bf because I've no time to fix flashruntime-redux.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 10•15 years ago
|
||
Attachment #479007 -
Attachment is obsolete: true
Attachment #479008 -
Attachment is obsolete: true
| Assignee | ||
Comment 11•15 years ago
|
||
Tommy fixed the issues:
changeset: 5303:587a4476e0ea
changeset: 5301:bf24595d5b5d
changeset: 5300:1f3798783da2
changeset: 5299:79323113e543
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Flags: flashplayer-bug-
You need to log in
before you can comment on or make changes to this bug.
Description
•