Last Comment Bug 620452 - jsemit.cpp compile failure when #undef JS_HAS_SHARP_VARS
: jsemit.cpp compile failure when #undef JS_HAS_SHARP_VARS
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla11
Assigned To: Andrew Paprocki
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2010-12-20 11:22 PST by Andrew Paprocki
Modified: 2012-02-01 13:59 PST (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Define sharpnum always (369 bytes, patch)
2010-12-20 11:22 PST, Andrew Paprocki
mrbkap: review+
Details | Diff | Splinter Review
Define sharpnum always (1.01 KB, patch)
2011-10-24 19:20 PDT, Andrew Paprocki
mrbkap: review+
Details | Diff | Splinter Review
Always define sharpnum (1.04 KB, patch)
2011-11-21 18:56 PST, Andrew Paprocki
no flags Details | Diff | Splinter Review

Description User image Andrew Paprocki 2010-12-20 11:22:01 PST
Created attachment 498776 [details] [diff] [review]
Define sharpnum always

The definition of the EmitNewInit() static function in jsemit.cpp always has a "sharpnum" argument. This function is called 3 times within the file outside of JS_HAS_SHARP_VARS checks passing the "sharpnum" variable. This variable is only defined when JS_HAS_SHARP_VARS is defined, thus breaking the build.

The attached patch simply always defines the variable since it is always passed to EmitNewInit(). I assume this is preferred over putting the definition of EmitNewInit() as well as all the callers inside #ifdefs.
Comment 1 User image Andrew Paprocki 2011-10-24 19:20:23 PDT
Created attachment 569267 [details] [diff] [review]
Define sharpnum always

Revisiting old bugs, rebased patch to mozilla-inbound.
Comment 2 User image Ed Morley [:emorley] 2011-10-28 03:06:06 PDT
applying thg-import-agrin7.patch
unable to find 'js/src/frontend/BytecodeGenerator.cpp' for patching
1 out of 1 hunks FAILED -- saving rejects to file js/src/frontend/BytecodeGenerator.cpp.rej
Comment 3 User image Andrew Paprocki 2011-10-28 08:39:37 PDT
Ed, this checkin failed? Were you applying the patch to mozilla-inbound?
Comment 4 User image Ed Morley [:emorley] 2011-10-28 08:45:21 PDT
Yeah sorry meant to put was applying to inbound.
Thanks :-)
Comment 5 User image Andrew Paprocki 2011-11-21 18:56:30 PST
Created attachment 576064 [details] [diff] [review]
Always define sharpnum

Updated patch to apply clean to m-i.
Comment 7 User image Marco Bonardo [::mak] 2011-11-28 05:21:47 PST

Note You need to log in before you can comment on or make changes to this bug.