Closed
Bug 563123
Opened 14 years ago
Closed 14 years ago
use js::HashMap for JSCodeGenerator::constList
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: luke, Assigned: luke)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
9.22 KB,
patch
|
igor
:
review+
|
Details | Diff | Splinter Review |
This is good for 549143 when values don't fit in a void*. Also it would be nice to move away from atomized doubles.
Attachment #442885 -
Flags: review?(igor)
Updated•14 years ago
|
Attachment #442885 -
Flags: review?(igor) → review+
Comment 1•14 years ago
|
||
Comment on attachment 442885 [details] [diff] [review] patch >diff --git a/js/src/jsemit.cpp b/js/src/jsemit.cpp >@@ -1639,20 +1641,19 @@ LookupCompileTimeConstant(JSContext >+ if (JSConstMap::Ptr p = cg->constMap.lookup(atom)) { >+ JS_ASSERT(p->value != JSVAL_HOLE); >+ *vp = p->value; > return JS_TRUE; ... >+typedef js::HashMap<JSAtom *, jsval> JSConstMap; > struct JSCodeGenerator : public JSTreeContext > { Nit: put JSConstMap typedef into JSCodeGenerator. That would lengthen somewhat the lookup statement, but that perhaps suggests to have an alternative lookup method like bool lookup(Value &)
Assignee | ||
Comment 2•14 years ago
|
||
(In reply to comment #1) Thanks. 'JSCodeGenerator::ConstMap p = cg->constMap.lookup(atom);' still fits on one line, so, to keep the patch small, I didn't method-ize anything. http://hg.mozilla.org/tracemonkey/rev/c6857d0b1e9f
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 3•14 years ago
|
||
Missed an init. http://hg.mozilla.org/tracemonkey/rev/c6857d0b1e9f
Comment 4•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c6857d0b1e9f
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•