Closed Bug 387034 Opened 17 years ago Closed 17 years ago

ActionMonkey: link MMgc into js

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

Attachments

(1 file, 5 obsolete files)

This bug is for a patch to link MMgc into SpiderMonkey.  (See comments.)

You'll need to get http://hg.mozilla.org/actionmonkey first.

cd actionmonkey

python client.py checkout

cd js/tamarin

Then build Tamarin using the build instructions at
  http://developer.mozilla.org/en/docs/Tamarin_Build_Documentation
As a side effect, this builds libMMgc.a or MMgc.lib.

cd ../..

Apply the attached patch and then:

cd js/src

make JS_MMGC=1 -f Makefile.ref
The initial patch is extremely rough:

1.  It will only work on Mac OS X.

2.  It only works for the standalone js shell and library.

3.  It almost certainly breaks Firefox.

Needless to say, don't commit this!
Assignee: general → jorendorff
Blocks: 387012
This patch works when building MineField on Mac.
You must apply both the preceding patch and this one to build Firefox with MMgc.

(Note: MMgc is only linked in, not actually used except in one minor place, to make sure it's really linking properly and doesn't crash at run time.)
Comment on attachment 272674 [details] [diff] [review]
link MMgc into js - Mac only, apps only, apply to actionmonkey repo

Please review this for check-in on actionmonkey branch, with the understanding it'll break things on Windows/Linux (temporarily)
Attachment #272674 - Flags: review?(benjamin)
Comment on attachment 272675 [details] [diff] [review]
link MMgc into js - Mac only, apps only, apply to actionmonkey-tamarin repo

same here, but actionmonkey-tamarin repo
Attachment #272675 - Flags: review?(benjamin)
Attachment #272674 - Attachment is obsolete: true
Attachment #272694 - Flags: review?(benjamin)
Attachment #272674 - Flags: review?(benjamin)
These now work whether you're building Firefox or just standalone js shell.
Attachment #272675 - Attachment is obsolete: true
Attachment #272695 - Flags: review?(benjamin)
Attachment #272675 - Flags: review?(benjamin)
Attachment #271128 - Attachment is obsolete: true
Comment on attachment 272694 [details] [diff] [review]
link MMgc into js - Mac only, apply to actionmonkey repo

>diff -r 4237c828b638 js/src/Makefile.in

>+# XXX FIXME Mac-specific options.
>+DEFINES += -DTARGET_API_MAC_CARBON=1 -DDARWIN=1 -D_MAC -DTARGET_RT_MAC_MACHO=1 -DUSE_MMAP -D_MAC -DSOFT_ASSERTS
>+ifdef MOZ_DEBUG
>+DEFINES += -D__DEBUGGING__
>+endif
>+EXTRA_DSO_LDOPTS += -framework Carbon

Go ahead and put this entire block in a platform test for now:
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))

>+EXTRA_DSO_LDOPTS += $(DEPTH)/js/tamarin/$(LIB_PREFIX)MMgc.$(LIB_SUFFIX)

This should be before the -framework Carbon line.
Attachment #272694 - Flags: review?(benjamin) → review+
Attachment #272695 - Flags: review?(benjamin) → review+
Applied with those changes (ActionMonkey branch only).
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attached patch correctionsSplinter Review
This fixes some problems building standalone js shell.

Get debug flags right when invoking Tamarin build.  Also, add -fno-rtti on Mac and Linux.
Attachment #273302 - Flags: review?(edilee)
Attachment #272694 - Attachment is obsolete: true
Attachment #272695 - Attachment is obsolete: true
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 273302 [details] [diff] [review]
corrections

>diff -r 3d7fa73c403c js/src/Makefile.ref
>+TAMARIN_MAKE_FLAGS = ENABLE_DEBUG=1
>+	$(MAKE) $(TAMARIN_MAKE_FLAGS) -C $(TAMARIN_OBJDIR)
Nice reuse of tamarin's flags (configure.py, build/config.mk)

>diff -r 3d7fa73c403c js/src/config/Darwin.mk
>-CFLAGS +=  -Wall -Wno-format
>+CFLAGS +=  -Wall -Wno-format -fno-rtti
Good. I had to add that in to get things working for me on the mac. :)
Attachment #273302 - Flags: review?(edilee) → review+
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.