Closed Bug 417419 Opened 14 years ago Closed 14 years ago

You too can solve global-warming without making the JS_INLINE macro ugly. Here's how:

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jag+mozilla, Assigned: jag+mozilla)

References

()

Details

Attachments

(1 file)

Follow-up to bug 417077. If you move the __attribute((always_inline))__ before the function definition you don't need to declare it separately.

Compiles on GCC 4.1.1, wouldn't mind if someone could test this against older GCC.
Attachment #303210 - Flags: review?(brendan)
Comment on attachment 303210 [details] [diff] [review]
Revert most JS_INLINE call sites, drop x arg from it.

Thanks -- can you land?

/be
Attachment #303210 - Flags: review?(brendan)
Attachment #303210 - Flags: review+
Attachment #303210 - Flags: approval1.9+
Blocks: 417477
Duplicate of this bug: 417477
If no objections, I'll land this fix shortly.
Summary: You too can solve global-warming while looking pretty. Here's how: → You too can solve global-warming without making the JS_INLINE macro ugly. Here's how:
I did apply the patch, however Mingw is not yet happy:

/mozilla/mozilla/js/src/jsapi.c
In file included from d:/mozilla/mozilla/js/src/jsatom.h:55,
                 from d:/mozilla/mozilla/js/src/jsapi.c:57:
d:/mozilla/mozilla/js/src/jslock.h:229: error: syntax error before "void"
d:/mozilla/mozilla/js/src/jslock.h:230: error: syntax error before "void"
In file included from d:/mozilla/mozilla/js/src/jsapi.c:59:
d:/mozilla/mozilla/js/src/jscntxt.h:755: warning: type of bit-field `operationCa
llbackIsSet' is a GCC extension
d:/mozilla/mozilla/js/src/jscntxt.h:756: warning: type of bit-field `operationLi
mit' is a GCC extension
make[4]: *** [jsapi.o] Error 1
make[4]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw/js/src'
make[3]: *** [libs_tier_js] Error 2
make[3]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make[2]: *** [tier_js] Error 2
make[2]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/cygdrive/d/mozilla/mozilla/object-mingw'
make: *** [build] Error 2
re: comment #4 what happens if you remove the "extern" from those declarations?
Mingw may need its own ifdefs -- file a new bug. Let's get this patch in.

/be
Actually, the lines he's failing on are lines jag didn't revert, there's no JS_INLINE on them now.  (I removed it originally when writing my patch)  I think the extern tag is unnecessary, though, and perhaps that's why MinGW is complaining.
But yes, I think we should land this.  Since I haven't heard from jag since this AM, I will do so now.
Checking in js/src/jslock.c;
/cvsroot/mozilla/js/src/jslock.c,v  <--  jslock.c
new revision: 3.78; previous revision: 3.77
done
Checking in js/src/jsregexp.c;
/cvsroot/mozilla/js/src/jsregexp.c,v  <--  jsregexp.c
new revision: 3.183; previous revision: 3.182
done
Checking in js/src/jstypes.h;
/cvsroot/mozilla/js/src/jstypes.h,v  <--  jstypes.h
new revision: 3.45; previous revision: 3.44
done
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
I reopened bug 417477 to deal with the MinGW issue.
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.