Closed
Bug 969748
Opened 12 years ago
Closed 9 years ago
"callers:Atomize" search returns a single hit; it should find almost 50
Categories
(Webtools Graveyard :: DXR, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: n.nethercote, Unassigned)
Details
I tried searching for "callers:Atomize", and DXR gave me a single hit:
js/src/frontend/TokenStream.cpp
1049 TokenStream::getTokenInternal(Modifier modifier)
Here's what rgrep says if I search for "\<Atomize(" within js/src/:
builtin/Intl.cpp: RootedAtom a(cx, Atomize(cx, lang, strlen(lang)));
builtin/TypedObject.cpp: RootedAtom className(cx, Atomize(cx, T::class_.name,
gdb/tests/test-JSString.cpp: JSAtom *molybdenum = js::Atomize(cx, "molybdenum", 10);
jit/AsmJS.cpp: JSAtom *atom = Atomize(cx_, name, strlen(name));
jsapi-tests/testIntern.cpp: JS::Rooted<JSAtom*> atom(cx, js::Atomize(cx, someChars, ArrayLength(someChars)));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: RootedAtom nameAtom(cx, Atomize(cx, name, strlen(name)));
jsapi.cpp: RootedAtom getterNameAtom(cx, Atomize(cx, getterName, strlen(getterName)));
jsapi.cpp: RootedAtom setterNameAtom(cx, Atomize(cx, setterName, strlen(setterName)));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: atom = Atomize(cx, name, strlen(name));
jsapi.cpp: RootedAtom shName(cx, Atomize(cx, selfHostedName, strlen(selfHostedName)));
jsapi.cpp: atom = Atomize(cx, fs->name, strlen(fs->name));
jsapi.cpp: RootedAtom shName(cx, Atomize(cx, fs->selfHostedName, strlen(fs->selfHostedName)));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: funAtom = Atomize(cx, name, strlen(name));
jsapi.cpp: RootedAtom argAtom(cx, Atomize(cx, argnames[i], strlen(argnames[i])));
jsapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsapi.cpp: JSAtom *atom = Atomize(cx, s, length, InternAtom);
jsatom.cpp: JSAtom *atom = Atomize(cx, cachedNames[i].str, cachedNames[i].length, InternAtom);
jscntxt.cpp: PropertyName *usageAtom = Atomize(cx, usageStr, strlen(usageStr))->asPropertyName();
jsfriendapi.cpp: JSAtom *atom = Atomize(cx, value, strlen(value));
jsfriendapi.cpp: JSAtom *atom = Atomize(cx, fs->name, strlen(fs->name));
jsfriendapi.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsfriendapi.cpp: atom = Atomize(cx, name, strlen(name));
jsinfer.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
jsnum.cpp: JSAtom *atom = Atomize(cx, start, length);
jsnum.cpp: JSAtom *atom = Atomize(cx, numStr, length);
jsobj.cpp: RootedAtom atom(cx, Atomize(cx, clasp->name, strlen(clasp->name)));
jsobj.cpp: JSAtom *atom = Atomize(cx, clasp->name, strlen(clasp->name));
jsreflect.cpp: RootedAtom atom(cx, Atomize(cx, name, strlen(name)));
jsreflect.cpp: RootedAtom atom(cx, Atomize(cx, s, strlen(s)));
jsreflect.cpp: RootedAtom atom(cx, Atomize(cx, name, strlen(name)));
vm/Debugger.cpp: JSAtom *atom = Atomize(cx, name, strlen(name));
vm/Debugger.cpp: JSAtom *str = Atomize(cx, className, strlen(className));
vm/Debugger.cpp: JSAtom *str = Atomize(cx, s, strlen(s), InternAtom);
vm/SelfHosting.cpp: RootedAtom atom(cx, Atomize(cx, str, strlen(str)));
vm/SelfHosting.cpp: id = AtomToId(Atomize(cx, "cloneAtCallsite", strlen("cloneAtCallsite")));
vm/SelfHosting.cpp: id = AtomToId(Atomize(cx, "inline", strlen("inline")));
| Reporter | ||
Comment 1•12 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #0)
> I tried searching for "callers:Atomize", and DXR gave me a single hit:
>
> js/src/frontend/TokenStream.cpp
> 1049 TokenStream::getTokenInternal(Modifier modifier)
And this hit is also wrong -- getTokenInternal() doesn't call Atomize().
Comment 2•12 years ago
|
||
At least part of this is due to the case-insensitivity of structural queries, which we're fixing in bug 948613.
Comment 3•12 years ago
|
||
But that doesn't explain why, when I surf to the actual definition of Atomize and use the context menu to find its callers (+callers:"js::Atomize(class js::ExclusiveContext *, const char *, size_t, enum js::InternBehavior)"), it returns no results.
Comment 4•12 years ago
|
||
(Mostly for my own reference,) getTokenInternal() calls a different function called "atomize" (lowercase).
This one (or at least its current version) seems to be working now - I get 63 hits from
https://dxr.mozilla.org/mozilla-central/search?q=%2Bcallers%3A%22js%3A%3AAtomize%28class+js%3A%3AExclusiveContext+*%2C+const+char+*%2C+size_t%2C+js%3A%3APinningBehavior%29%22
Please reopen if you find some it's still missing.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Tom Klein from comment #5)
> This one (or at least its current version) seems to be working now - I get
> 63 hits from
> https://dxr.mozilla.org/mozilla-central/
> search?q=%2Bcallers%3A%22js%3A%3AAtomize%28class+js%3A%3AExclusiveContext+*%2
> C+const+char+*%2C+size_t%2C+js%3A%3APinningBehavior%29%22
>
> Please reopen if you find some it's still missing.
It's much better, but there's one file with bogus results:
> js/src/vm/Debugger.cpp
> 1438 CallMethodIfPresent(JSContext* cx, HandleObject obj, const char* name, size_t argc, Value* argv,
> 4684 bool lostEvents = logger->lostEvents(dbg->traceLoggerLastDrainedIteration,
> 4838
> 6974
> 7695
> 8914 THIS_DEBUGENV(cx, argc, vp, "get type", args, envobj, env);
> 9223 // the only constraint is that they should be in their debugger's compartment.
> 9475 return nullptr;
Thanks for catching that, I had missed it. Turns out it's already a known issue with that file: bug 1224516 I think the 'callers' query is finding all of the results (there are eight Atomize calls in that file and that's how many the query returns), it's just the markup/highlighting/offsets are all screwy in that file and the links aren't landing at the right place. I'll leave a comment in the other bug.
Updated•5 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•