Unreviewed, fixes to silly things. While landing fixes to r181993, I introduced crash...
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2015 07:17:08 +0000 (07:17 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Mar 2015 07:17:08 +0000 (07:17 +0000)
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants): I landed a fix for a VS warning. It broke this. Now I'm fixing it.
* ftl/FTLCompile.cpp:
(JSC::FTL::compile): Make sure we pass the module when dumping. This makes FTL debugging possible again.
* ftl/FTLState.cpp:
(JSC::FTL::State::dumpState): New overload that takes a module, so that we can call this after FTL::compile() clears State's module.
* ftl/FTLState.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@182004 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
Source/JavaScriptCore/ftl/FTLCompile.cpp
Source/JavaScriptCore/ftl/FTLState.cpp
Source/JavaScriptCore/ftl/FTLState.h

index d772c31..335be07 100644 (file)
@@ -1,3 +1,15 @@
+2015-03-26  Filip Pizlo  <fpizlo@apple.com>
+
+        Unreviewed, fixes to silly things. While landing fixes to r181993, I introduced crashes. This fixes them.
+
+        * dfg/DFGConstantFoldingPhase.cpp:
+        (JSC::DFG::ConstantFoldingPhase::foldConstants): I landed a fix for a VS warning. It broke this. Now I'm fixing it.
+        * ftl/FTLCompile.cpp:
+        (JSC::FTL::compile): Make sure we pass the module when dumping. This makes FTL debugging possible again.
+        * ftl/FTLState.cpp:
+        (JSC::FTL::State::dumpState): New overload that takes a module, so that we can call this after FTL::compile() clears State's module.
+        * ftl/FTLState.h:
+
 2015-03-25  Filip Pizlo  <fpizlo@apple.com>
 
         Unreviewed, fix obvious goof that was causing 32-bit debug crashes. The 64-bit version did it
index ef97432..6dc84c2 100644 (file)
@@ -232,7 +232,10 @@ private:
                 StackAccessData* data;
                 if (inlineCallFrame) {
                     data = m_graph.m_stackAccessData.add(
-                        inlineCallFrame->arguments[index.asInt32() + 1].virtualRegister(), FlushedJSValue);
+                        VirtualRegister(
+                            inlineCallFrame->stackOffset +
+                            CallFrame::argumentOffset(index.asInt32())),
+                        FlushedJSValue);
                 } else {
                     data = m_graph.m_stackAccessData.add(
                         virtualRegisterForArgument(index.asInt32() + 1), FlushedJSValue);
index a83e891..81cc33a 100644 (file)
@@ -743,8 +743,8 @@ void compile(State& state, Safepoint::Result& safepointResult)
         }
 
         if (shouldShowDisassembly() || verboseCompilationEnabled())
-            state.dumpState("after optimization");
-    
+            state.dumpState(module, "after optimization");
+        
         // FIXME: Need to add support for the case where JIT memory allocation failed.
         // https://bugs.webkit.org/show_bug.cgi?id=113620
         state.generatedFunction = reinterpret_cast<GeneratedFunction>(llvm->GetPointerToGlobal(engine, state.function));
index 7937050..038e9b1 100644 (file)
@@ -92,6 +92,11 @@ State::~State()
 
 void State::dumpState(const char* when)
 {
+    dumpState(module, when);
+}
+
+void State::dumpState(LModule module, const char* when)
+{
     dataLog("LLVM IR for ", CodeBlockWithJITType(graph.m_codeBlock, FTL::JITCode::FTLJIT), " ", when, ":\n");
     dumpModule(module);
 }
index 2e2947a..8a0679b 100644 (file)
@@ -86,6 +86,7 @@ public:
     RefPtr<DataSection> stackmapsSection;
     
     void dumpState(const char* when);
+    void dumpState(LModule, const char* when);
 
     HashSet<CString> nativeLoadedLibraries;