Closed
Bug 453889
Opened 16 years ago
Closed 16 years ago
prbool bugs in spidermonkey
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: taras.mozilla, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
igor
:
review-
|
Details | Diff | Splinter Review |
The main one I'm unsure about PRBool <- JSPackedBool, should i be treating JSPackedBool as PRBool?
Attachment #337127 -
Flags: review?(igor)
Comment 1•16 years ago
|
||
What about defining JSBool and PRBool as bool under C++ or C99? This would simplify the patch.
Comment 2•16 years ago
|
||
Comment on attachment 337127 [details] [diff] [review]
spidermonkey bugs
>diff --git a/js/src/jsemit.cpp b/js/src/jsemit.cpp
...
>-static JSBool
>+static ptrdiff_t
> EmitJump(JSContext *cx, JSCodeGenerator *cg, JSOp op, ptrdiff_t off)
> {
> JSBool extend;
>@@ -1175,13 +1175,13 @@ EmitJump(JSContext *cx, JSCodeGenerator
>
> extend = off < JUMP_OFFSET_MIN || JUMP_OFFSET_MAX < off;
> if (extend && !cg->spanDeps && !BuildSpanDepTable(cx, cg))
>- return JS_FALSE;
>+ return NULL;
...
> if (!AddSpanDep(cx, cg, pc, pc, off))
>- return JS_FALSE;
>+ return NULL;
In both change chunks the function should return (ptrdiff_t) -1, not NULL, to indicate an error.
Attachment #337127 -
Flags: review?(igor) → review-
Reporter | ||
Comment 3•16 years ago
|
||
pushed d518ddaac216
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 4•16 years ago
|
||
(In reply to comment #1)
> What about defining JSBool and PRBool as bool under C++ or C99? This would
> simplify the patch.
It would also cause a whole lot of compile errors and cause the patch to be bigger. But the main problem is that it would also break API compatibility.
I'd be all for eliminating internal prbools in favour of bools if we could somehow figure out what interal means.
Updated•16 years ago
|
Flags: in-testsuite-
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•