зеркало из https://github.com/mozilla/gecko-dev.git
Followup to last checkin to better comment the dependency I missed.
This commit is contained in:
Родитель
9f77637919
Коммит
1ba5b62aa7
|
@ -4300,6 +4300,12 @@ void DumpSrcNoteSizeHist()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fill in the storage at notes with prolog and main srcnotes; the space at
|
||||||
|
* notes was allocated using the CG_COUNT_FINAL_SRCNOTES macro from jsemit.h.
|
||||||
|
* SO DON'T CHANGE THIS FUNCTION WITHOUT AT LEAST CHECKING WHETHER jsemit.h's
|
||||||
|
* CG_COUNT_FINAL_SRCNOTES MACRO NEEDS CORRESPONDING CHANGES!
|
||||||
|
*/
|
||||||
JSBool
|
JSBool
|
||||||
js_FinishTakingSrcNotes(JSContext *cx, JSCodeGenerator *cg, jssrcnote *notes)
|
js_FinishTakingSrcNotes(JSContext *cx, JSCodeGenerator *cg, jssrcnote *notes)
|
||||||
{
|
{
|
||||||
|
|
|
@ -476,7 +476,8 @@ js_SetSrcNoteOffset(JSContext *cx, JSCodeGenerator *cg, uintN index,
|
||||||
*
|
*
|
||||||
* To compute the number of JSSrcNotes to allocate and pass in via notes, use
|
* To compute the number of JSSrcNotes to allocate and pass in via notes, use
|
||||||
* the CG_COUNT_FINAL_SRCNOTES macro. This macro knows a lot about details of
|
* the CG_COUNT_FINAL_SRCNOTES macro. This macro knows a lot about details of
|
||||||
* js_FinishTakingSrcNotes.
|
* js_FinishTakingSrcNotes, SO DON'T CHANGE jsemit.c's js_FinishTakingSrcNotes
|
||||||
|
* FUNCTION WITHOUT CHECKING WHETHER THIS MACRO NEEDS CORRESPONDING CHANGES!
|
||||||
*/
|
*/
|
||||||
#define CG_COUNT_FINAL_SRCNOTES(cg, cnt) \
|
#define CG_COUNT_FINAL_SRCNOTES(cg, cnt) \
|
||||||
JS_BEGIN_MACRO \
|
JS_BEGIN_MACRO \
|
||||||
|
@ -487,15 +488,14 @@ js_SetSrcNoteOffset(JSContext *cx, JSCodeGenerator *cg, uintN index,
|
||||||
if (diff_ > SN_DELTA_MASK) \
|
if (diff_ > SN_DELTA_MASK) \
|
||||||
cnt += JS_HOWMANY(diff_ - SN_DELTA_MASK, SN_XDELTA_MASK); \
|
cnt += JS_HOWMANY(diff_ - SN_DELTA_MASK, SN_XDELTA_MASK); \
|
||||||
cnt += 2 + (((cg)->firstLine > SN_3BYTE_OFFSET_MASK) << 1); \
|
cnt += 2 + (((cg)->firstLine > SN_3BYTE_OFFSET_MASK) << 1); \
|
||||||
} else { \
|
} else if (diff_ > 0) { \
|
||||||
if (cg->main.noteCount) { \
|
if (cg->main.noteCount) { \
|
||||||
jssrcnote *sn_ = (cg)->main.notes; \
|
jssrcnote *sn_ = (cg)->main.notes; \
|
||||||
ptrdiff_t delta_ = SN_IS_XDELTA(sn_) \
|
diff_ -= SN_IS_XDELTA(sn_) \
|
||||||
? SN_XDELTA_MASK - (*sn_ & SN_XDELTA_MASK) \
|
? SN_XDELTA_MASK - (*sn_ & SN_XDELTA_MASK) \
|
||||||
: SN_DELTA_MASK - (*sn_ & SN_DELTA_MASK); \
|
: SN_DELTA_MASK - (*sn_ & SN_DELTA_MASK); \
|
||||||
diff_ -= JS_MIN(delta_, diff_); \
|
|
||||||
} \
|
} \
|
||||||
if (diff_) \
|
if (diff_ > 0) \
|
||||||
cnt += JS_HOWMANY(diff_, SN_XDELTA_MASK); \
|
cnt += JS_HOWMANY(diff_, SN_XDELTA_MASK); \
|
||||||
} \
|
} \
|
||||||
JS_END_MACRO
|
JS_END_MACRO
|
||||||
|
|
Загрузка…
Ссылка в новой задаче