rename to mainCodeSize and auxCodeSize
authorMike Shaver <shaver@mozilla.org>
Wed, 05 Jan 2011 18:40:01 -0800
changeset 59855 eee5ef232ff5e2dc145f30010f92200a20c6790c
parent 59854 3841147809206fd53e9470e10e3510406e2133ab
child 59856 302ae510a8961f76f06d87d9b855d05d04f3d75f
push id5
push usershaver@mozilla.com
push dateThu, 06 Jan 2011 03:33:07 +0000
milestone2.0b9pre
rename to mainCodeSize and auxCodeSize
js/src/methodjit/MethodJIT.cpp
js/src/methodjit/MethodJIT.h
--- a/js/src/methodjit/MethodJIT.cpp
+++ b/js/src/methodjit/MethodJIT.cpp
@@ -830,17 +830,17 @@ mjit::JITScript::~JITScript()
     }
     
     for (uint32 i = 0; i < nCallICs; i++)
         callICs[i].releasePools();
 #endif
 }
 
 size_t
-mjit::JITScript::nonCodeSize()
+mjit::JITScript::auxCodeSize()
 {
     return sizeof(JITScript) +
         sizeof(NativeMapEntry) * nNmapPairs +
 #if defined JS_MONOIC
         sizeof(ic::MICInfo) * nMICs +
         sizeof(ic::CallICInfo) * nCallICs +
         sizeof(ic::EqualityICInfo) * nEqualityICs +
         sizeof(ic::TraceICInfo) * nTraceICs +
@@ -857,26 +857,26 @@ void
 mjit::ReleaseScriptCode(JSContext *cx, JSScript *script)
 {
     // NB: The recompiler may call ReleaseScriptCode, in which case it
     // will get called again when the script is destroyed, so we
     // must protect against calling ReleaseScriptCode twice.
     JITScript *jscr;
 
     if ((jscr = script->jitNormal)) {
-        cx->runtime->mjitMemoryUsed -= jscr->nonCodeSize() + jscr->codeSize();
+        cx->runtime->mjitMemoryUsed -= jscr->auxCodeSize() + jscr->mainCodeSize();
 
         jscr->~JITScript();
         cx->free(jscr);
         script->jitNormal = NULL;
         script->jitArityCheckNormal = NULL;
     }
 
     if ((jscr = script->jitCtor)) {
-        cx->runtime->mjitMemoryUsed -= jscr->nonCodeSize() + jscr->codeSize();
+        cx->runtime->mjitMemoryUsed -= jscr->auxCodeSize() + jscr->mainCodeSize();
 
         jscr->~JITScript();
         cx->free(jscr);
         script->jitCtor = NULL;
         script->jitArityCheckCtor = NULL;
     }
 }
 
--- a/js/src/methodjit/MethodJIT.h
+++ b/js/src/methodjit/MethodJIT.h
@@ -340,19 +340,19 @@ struct JITScript {
         return jcheck >= jitcode && jcheck < jitcode + code.m_size;
     }
 
     void nukeScriptDependentICs();
     void sweepCallICs();
     void purgeMICs();
     void purgePICs();
 
-    size_t nonCodeSize();
+    size_t auxCodeSize();
 
-    size_t codeSize() { return code.m_size; } /* doesn't account for fragmentation */
+    size_t mainCodeSize() { return code.m_size; } /* doesn't account for fragmentation */
 };
 
 /*
  * Execute the given mjit code. This is a low-level call and callers must
  * provide the same guarantees as JaegerShot/CheckStackAndEnterMethodJIT.
  */
 JSBool EnterMethodJIT(JSContext *cx, JSStackFrame *fp, void *code, Value *stackLimit);