Closed Bug 850928 Opened 13 years ago Closed 13 years ago

jsscript.h:645:24: warning: inline function 'const char* JSScript::filename() const' used but never defined [enabled by default]

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla22

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Newish build warning that I'm noticing for the first time in my mozilla-inbound build this afternoon: { In file included from /mozilla/js/src/vm/SPSProfiler.h:18:0, from /mozilla/js/src/jscntxt.h:37, from /mozilla/js/src/ion/IonAllocPolicy.h:13, from /mozilla/js/src/ion/BitSet.h:11, from /mozilla/js/src/ion/BitSet.cpp:9: Warning: enabled by default in /mozilla/js/src/jsscript.h: inline function ‘const char* JSScript::filename() const’ used but never defined /mozilla/js/src/jsscript.h:645:24: warning: inline function ‘const char* JSScript::filename() const’ used but never defined [enabled by default] } I get this for several other .cpp files, too.
hg bisect says this started with: { changeset: 124611:c51d394e31f3 user: Benjamin Peterson <benjamin@python.org> date: Tue Mar 12 21:56:55 2013 -0500 summary: Bug 779233 - Put a script's filename on the ScriptSource. r=billm }
...which makes sense, because that's what added filename() as a method: https://hg.mozilla.org/mozilla-central/rev/c51d394e31f3#l25.55 Basically, looks like the filename definition is in jsscriptinlines.h, and there's some code (maybe in another header?) that invokes it without #including jsscriptinlines.h.
FWIW, the other two instances of this warning that I hit are as follows: { In file included from /mozilla/js/src/ion/C1Spewer.h:13:0, from /mozilla/js/src/ion/IonSpewer.h:15, from /mozilla/js/src/assembler/assembler/AssemblerBuffer.h:46, from /mozilla/js/src/assembler/assembler/X86Assembler.h:39, from /mozilla/js/src/assembler/assembler/MacroAssemblerX86Common.h:37, from /mozilla/js/src/assembler/assembler/MacroAssemblerX86_64.h:39, from /mozilla/js/src/assembler/assembler/MacroAssembler.h:54, from /mozilla/js/src/ion/x64/Architecture-x64.h:11, from /mozilla/js/src/ion/Registers.h:16, from /mozilla/js/src/ion/MoveResolver.h:11, from /mozilla/js/src/ion/MoveResolver.cpp:8: /mozilla/js/src/jsscript.h:645:24: warning: inline function ‘const char* JSScript::filename() const’ used but never defined [enabled by default] } { In file included from /mozilla/js/src/vm/SPSProfiler.h:18:0, from /mozilla/js/src/jscntxt.h:37, from /mozilla/js/src/ion/Ion.h:11, from /mozilla/js/src/ion/shared/IonFrames-x86-shared.cpp:8: /mozilla/js/src/jsscript.h:645:24: warning: inline function ‘const char* JSScript::filename() const’ used but never defined [enabled by default] }
This also fixes some other warnings.
Attachment #724702 - Flags: review?(dholbert)
Comment on attachment 724702 [details] [diff] [review] fix some warnings >--- a/js/src/ion/IonCaches.cpp >+++ b/js/src/ion/IonCaches.cpp >@@ -1542,19 +1542,16 @@ bool > GetElementIC::attachDenseElement(JSContext *cx, IonScript *ion, JSObject *obj, const Value &idval) > { > JS_ASSERT(obj->isNative()); > JS_ASSERT(idval.isInt32()); > > Label failures; > MacroAssembler masm(cx); > >- Register scratchReg = output().scratchReg().gpr(); >- JS_ASSERT(scratchReg != InvalidReg); >- I can't comment on this removal, because I don't know this code well enough to understand this check and what we're losing by dropping it. Maybe billm knows what's going on there? (requesting additional-review from him; feel free to retarget if you have a more appropriate reviewer in mind) r=me on the jsscriptinlines #includes and the DebugOnly usages, though.
Attachment #724702 - Flags: review?(wmccloskey)
Attachment #724702 - Flags: review?(dholbert)
Attachment #724702 - Flags: review+
Attachment #724702 - Flags: review?(wmccloskey) → review?(dvander)
Attachment #724702 - Flags: review?(dvander) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: