Bug 895830 - OdinMonkey: fix compilation of the perf spewer support. r=luke
authorDouglas Crosher <dtc-moz@scieneer.com>
Fri, 19 Jul 2013 20:42:38 +1000
changeset 139251 f0f4f06a071a0c808b59dbf4a6909524c1a051ee
parent 139250 f5522f7421080d00119b90743fd2187d31f36064
child 139252 3f7dab57851c4d7b33616ec13d037830d88d2d0a
push idunknown
push userunknown
push dateunknown
reviewersluke
bugs895830
milestone25.0a1
Bug 895830 - OdinMonkey: fix compilation of the perf spewer support. r=luke
js/src/ion/AsmJS.cpp
js/src/ion/AsmJSLink.cpp
--- a/js/src/ion/AsmJS.cpp
+++ b/js/src/ion/AsmJS.cpp
@@ -1447,24 +1447,24 @@ class MOZ_STACK_CLASS ModuleCompiler
     bool trackProfiledFunction(const Func &func, unsigned endCodeOffset) {
         unsigned startCodeOffset = func.code()->offset();
         return module_->trackProfiledFunction(func.name(), startCodeOffset, endCodeOffset);
     }
 #endif
 #ifdef JS_ION_PERF
     bool trackPerfProfiledFunction(const Func &func, unsigned endCodeOffset) {
         unsigned lineno = 0U, columnIndex = 0U;
-        tokenStream_.srcCoords.lineNumAndColumnIndex(func.srcOffset(), &lineno, &columnIndex);
-
-        unsigned startCodeOffset = func.codeLabel()->offset();
+        parser().tokenStream.srcCoords.lineNumAndColumnIndex(func.srcOffset(), &lineno, &columnIndex);
+
+        unsigned startCodeOffset = func.code()->offset();
         return module_->trackPerfProfiledFunction(func.name(), startCodeOffset, endCodeOffset, lineno, columnIndex);
     }
 
     bool trackPerfProfiledBlocks(AsmJSPerfSpewer &perfSpewer, const Func &func, unsigned endCodeOffset) {
-        unsigned startCodeOffset = func.codeLabel()->offset();
+        unsigned startCodeOffset = func.code()->offset();
         perfSpewer.noteBlocksOffsets(masm_);
         return module_->trackPerfProfiledBlocks(func.name(), startCodeOffset, endCodeOffset, perfSpewer.basicBlocks());
     }
 #endif
     bool addFunctionCounts(IonScriptCounts *counts) {
         return module_->addFunctionCounts(counts);
     }
 
@@ -4783,17 +4783,17 @@ GenerateCode(ModuleCompiler &m, ModuleCo
     if (iJIT_IsProfilingActive() == iJIT_SAMPLING_ON) {
         if (!m.trackProfiledFunction(func, m.masm().size()))
             return false;
     }
 #endif
 
 #ifdef JS_ION_PERF
     if (PerfBlockEnabled()) {
-        if (!m.trackPerfProfiledBlocks(mirGen.perfSpewer(), func, m.masm().size()))
+        if (!m.trackPerfProfiledBlocks(mir.perfSpewer(), func, m.masm().size()))
             return false;
     } else if (PerfFuncEnabled()) {
         if (!m.trackPerfProfiledFunction(func, m.masm().size()))
             return false;
     }
 #endif
 
     // A single MacroAssembler is reused for all function compilations so
--- a/js/src/ion/AsmJSLink.cpp
+++ b/js/src/ion/AsmJSLink.cpp
@@ -487,17 +487,17 @@ SendFunctionsToPerf(JSContext *cx, AsmJS
     if (!PerfFuncEnabled())
         return true;
 
     AsmJSPerfSpewer perfSpewer;
 
     unsigned long base = (unsigned long) module.functionCode();
 
     const AsmJSModule::PostLinkFailureInfo &info = module.postLinkFailureInfo();
-    const char *filename = const_cast<char *>(info.scriptSource_->filename());
+    const char *filename = const_cast<char *>(info.scriptSource->filename());
 
     for (unsigned i = 0; i < module.numPerfFunctions(); i++) {
         const AsmJSModule::ProfiledFunction &func = module.perfProfiledFunction(i);
 
         unsigned long start = base + (unsigned long) func.startCodeOffset;
         unsigned long end   = base + (unsigned long) func.endCodeOffset;
         JS_ASSERT(end >= start);
 
@@ -522,17 +522,17 @@ SendBlocksToPerf(JSContext *cx, AsmJSMod
 {
     if (!PerfBlockEnabled())
         return true;
 
     AsmJSPerfSpewer spewer;
     unsigned long funcBaseAddress = (unsigned long) module.functionCode();
 
     const AsmJSModule::PostLinkFailureInfo &info = module.postLinkFailureInfo();
-    const char *filename = const_cast<char *>(info.scriptSource_->filename());
+    const char *filename = const_cast<char *>(info.scriptSource->filename());
 
     for (unsigned i = 0; i < module.numPerfBlocksFunctions(); i++) {
         const AsmJSModule::ProfiledBlocksFunction &func = module.perfProfiledBlocksFunction(i);
 
         unsigned long size = (unsigned long)func.endCodeOffset - (unsigned long)func.startCodeOffset;
         JSAutoByteString bytes;
         const char *method_name = AtomToPrintableString(cx, func.name, &bytes);
         if (!method_name)