Bug 491514 - Followup, change from sizeof(LIns*) to sizeof(LIns), r=gal.
authorGraydon Hoare <graydon@mozilla.com>
Wed, 06 May 2009 17:41:52 -0700
changeset 28095 fef1f50d67506e8bb082d6625b7f3c186f8ba455
parent 28094 311825fa36aedd29ea70de71f4104981ba62cc85
child 28096 0fb93c90d996243e12c09758278ec539af0bf66b
push id6892
push userrsayre@mozilla.com
push dateFri, 08 May 2009 00:23:45 +0000
treeherdermozilla-central@bed245918256 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgal
bugs491514
milestone1.9.2a1pre
Bug 491514 - Followup, change from sizeof(LIns*) to sizeof(LIns), r=gal.
js/src/jstracer.cpp
js/src/nanojit/LIR.cpp
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -126,17 +126,17 @@ static const char tagChar[]  = "OIDISIBI
 
 /* Max call stack size. */
 #define MAX_CALL_STACK_ENTRIES 64
 
 /* Max global object size. */
 #define MAX_GLOBAL_SLOTS 4096
 
 /* Max memory you can allocate in a LIR buffer via a single skip() call. */
-#define MAX_SKIP_BYTES (NJ_PAGE_SIZE - (LIR_FAR_SLOTS + 1) * sizeof(LIns*))
+#define MAX_SKIP_BYTES (NJ_PAGE_SIZE - (LIR_FAR_SLOTS + 1) * sizeof(LIns))
 
 /* Max memory needed to rebuild the interpreter stack when falling off trace. */
 #define MAX_INTERP_STACK_BYTES                                                \
     (MAX_NATIVE_STACK_SLOTS * sizeof(jsval) +                                 \
      MAX_CALL_STACK_ENTRIES * sizeof(JSInlineFrame) +                         \
      sizeof(JSInlineFrame)) /* possibly slow native frame at top of stack */
 
 /* Max number of branches per tree. */
--- a/js/src/nanojit/LIR.cpp
+++ b/js/src/nanojit/LIR.cpp
@@ -154,17 +154,17 @@ namespace nanojit
 	
 	LInsp LirBuffer::next()
 	{
 		return _unused;
 	}
 
 	void LirBufWriter::ensureRoom(uint32_t count)
 	{
-		NanoAssert(count <= NJ_PAGE_SIZE - (LIR_FAR_SLOTS + 1) * sizeof(LIns*));
+		NanoAssert(count <= NJ_PAGE_SIZE - (LIR_FAR_SLOTS + 1) * sizeof(LIns));
 		LInsp before = _buf->next();
 		LInsp after = before+count+LIR_FAR_SLOTS;
 		// transition to the next page?
 		if (!samepage(before,after))
 		{
 			// we don't want this to fail, so we always have a page in reserve
 			NanoAssert(_buf->_nextPage);
 			_buf->_unused = &_buf->_nextPage->lir[0];