Title: [190555] trunk/Source/_javascript_Core
Revision
190555
Author
[email protected]
Date
2015-10-04 16:25:44 -0700 (Sun, 04 Oct 2015)

Log Message

CodeBlock.h shouldn't be included from everywhere
https://bugs.webkit.org/show_bug.cgi?id=149785

Reviewed by Andreas Kling.

* _javascript_Core.xcodeproj/project.pbxproj:
* dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:
* dfg/DFGAdaptiveStructureWatchpoint.cpp:
* interpreter/CallFrame.cpp:
(JSC::CallFrame::callSiteBitsAreBytecodeOffset):
(JSC::CallFrame::callSiteBitsAreCodeOriginIndex):
(JSC::CallFrame::callSiteAsRawBits):
(JSC::CallFrame::callSiteIndex):
(JSC::CallFrame::hasActivation):
(JSC::CallFrame::uncheckedActivation):
(JSC::CallFrame::stack):
* interpreter/CallFrameInlines.h: Removed.
* interpreter/Interpreter.cpp:
* interpreter/StackVisitor.cpp:
* runtime/DirectArguments.cpp:
* runtime/ErrorInstance.cpp:
* runtime/JSArray.cpp:
* runtime/JSCInlines.h:
* runtime/LiteralParser.cpp:
* runtime/NullSetterFunction.cpp:
* tools/JSDollarVMPrototype.cpp:

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (190554 => 190555)


--- trunk/Source/_javascript_Core/ChangeLog	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-10-04 23:25:44 UTC (rev 190555)
@@ -1,3 +1,32 @@
+2015-10-04  Filip Pizlo  <[email protected]>
+
+        CodeBlock.h shouldn't be included from everywhere
+        https://bugs.webkit.org/show_bug.cgi?id=149785
+
+        Reviewed by Andreas Kling.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp:
+        * dfg/DFGAdaptiveStructureWatchpoint.cpp:
+        * interpreter/CallFrame.cpp:
+        (JSC::CallFrame::callSiteBitsAreBytecodeOffset):
+        (JSC::CallFrame::callSiteBitsAreCodeOriginIndex):
+        (JSC::CallFrame::callSiteAsRawBits):
+        (JSC::CallFrame::callSiteIndex):
+        (JSC::CallFrame::hasActivation):
+        (JSC::CallFrame::uncheckedActivation):
+        (JSC::CallFrame::stack):
+        * interpreter/CallFrameInlines.h: Removed.
+        * interpreter/Interpreter.cpp:
+        * interpreter/StackVisitor.cpp:
+        * runtime/DirectArguments.cpp:
+        * runtime/ErrorInstance.cpp:
+        * runtime/JSArray.cpp:
+        * runtime/JSCInlines.h:
+        * runtime/LiteralParser.cpp:
+        * runtime/NullSetterFunction.cpp:
+        * tools/JSDollarVMPrototype.cpp:
+
 2015-10-03  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r190522.

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (190554 => 190555)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-10-04 23:25:44 UTC (rev 190555)
@@ -1502,7 +1502,6 @@
 		A7C0C4AC168103020017011D /* JSScriptRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C0C4AB167C08CD0017011D /* JSScriptRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A7C0C4AD1681067E0017011D /* JSScriptRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */; };
 		A7C1E8E4112E72EF00A37F98 /* JITPropertyAccess32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */; };
-		A7C1EAEF17987AB600299DB2 /* CallFrameInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C1EAEA17987AB600299DB2 /* CallFrameInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A7C1EAF017987AB600299DB2 /* JSStackInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C1EAEB17987AB600299DB2 /* JSStackInlines.h */; };
 		A7C1EAF117987AB600299DB2 /* StackVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C1EAEC17987AB600299DB2 /* StackVisitor.cpp */; };
 		A7C1EAF217987AB600299DB2 /* StackVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C1EAED17987AB600299DB2 /* StackVisitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3392,7 +3391,6 @@
 		A7C0C4AA167C08CD0017011D /* JSScriptRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptRef.cpp; sourceTree = "<group>"; };
 		A7C0C4AB167C08CD0017011D /* JSScriptRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptRefPrivate.h; sourceTree = "<group>"; };
 		A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess32_64.cpp; sourceTree = "<group>"; };
-		A7C1EAEA17987AB600299DB2 /* CallFrameInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallFrameInlines.h; sourceTree = "<group>"; };
 		A7C1EAEB17987AB600299DB2 /* JSStackInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStackInlines.h; sourceTree = "<group>"; };
 		A7C1EAEC17987AB600299DB2 /* StackVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = StackVisitor.cpp; sourceTree = "<group>"; };
 		A7C1EAED17987AB600299DB2 /* StackVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackVisitor.h; sourceTree = "<group>"; };
@@ -4115,7 +4113,6 @@
 				1429D8DB0ED2205B00B89619 /* CallFrame.cpp */,
 				1429D8DC0ED2205B00B89619 /* CallFrame.h */,
 				A7F869EC0F95C2EC00558697 /* CallFrameClosure.h */,
-				A7C1EAEA17987AB600299DB2 /* CallFrameInlines.h */,
 				1429D7D30ED2128200B89619 /* Interpreter.cpp */,
 				1429D77B0ED20D7300B89619 /* Interpreter.h */,
 				1429D85B0ED218E900B89619 /* JSStack.cpp */,
@@ -6025,7 +6022,6 @@
 				BC18C3ED0E16F5CD00B34460 /* CallData.h in Headers */,
 				0F64B27A1A7957B2006E4E66 /* CallEdge.h in Headers */,
 				1429D8DE0ED2205B00B89619 /* CallFrame.h in Headers */,
-				A7C1EAEF17987AB600299DB2 /* CallFrameInlines.h in Headers */,
 				62EC9BB71B7EB07C00303AD1 /* CallFrameShuffleData.h in Headers */,
 				62D755D71B84FB4A001801FA /* CallFrameShuffler.h in Headers */,
 				95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */,

Modified: trunk/Source/_javascript_Core/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -28,6 +28,8 @@
 
 #if ENABLE(DFG_JIT)
 
+#include "CodeBlock.h"
+#include "DFGCommon.h"
 #include "JSCInlines.h"
 
 namespace JSC { namespace DFG {

Modified: trunk/Source/_javascript_Core/dfg/DFGAdaptiveStructureWatchpoint.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/dfg/DFGAdaptiveStructureWatchpoint.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/dfg/DFGAdaptiveStructureWatchpoint.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -28,6 +28,7 @@
 
 #if ENABLE(DFG_JIT)
 
+#include "CodeBlock.h"
 #include "JSCInlines.h"
 
 namespace JSC { namespace DFG {

Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/interpreter/CallFrame.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "CallFrame.h"
 
-#include "CallFrameInlines.h"
 #include "CodeBlock.h"
 #include "InlineCallFrame.h"
 #include "Interpreter.h"
@@ -37,6 +36,68 @@
 
 namespace JSC {
 
+bool CallFrame::callSiteBitsAreBytecodeOffset() const
+{
+    ASSERT(codeBlock());
+    switch (codeBlock()->jitType()) {
+    case JITCode::InterpreterThunk:
+    case JITCode::BaselineJIT:
+        return true;
+    case JITCode::None:
+    case JITCode::HostCallThunk:
+        RELEASE_ASSERT_NOT_REACHED();
+        return false;
+    default:
+        return false;
+    }
+
+    RELEASE_ASSERT_NOT_REACHED();
+    return false;
+}
+
+bool CallFrame::callSiteBitsAreCodeOriginIndex() const
+{
+    ASSERT(codeBlock());
+    switch (codeBlock()->jitType()) {
+    case JITCode::DFGJIT:
+    case JITCode::FTLJIT:
+        return true;
+    case JITCode::None:
+    case JITCode::HostCallThunk:
+        RELEASE_ASSERT_NOT_REACHED();
+        return false;
+    default:
+        return false;
+    }
+
+    RELEASE_ASSERT_NOT_REACHED();
+    return false;
+}
+
+unsigned CallFrame::callSiteAsRawBits() const
+{
+    return this[JSStack::ArgumentCount].tag();
+}
+
+CallSiteIndex CallFrame::callSiteIndex() const
+{
+    return CallSiteIndex(callSiteAsRawBits());
+}
+
+bool CallFrame::hasActivation() const
+{
+    JSValue activation = uncheckedActivation();
+    return !!activation && activation.isCell();
+}
+
+JSValue CallFrame::uncheckedActivation() const
+{
+    CodeBlock* codeBlock = this->codeBlock();
+    RELEASE_ASSERT(codeBlock->needsActivation());
+    VirtualRegister activationRegister = codeBlock->activationRegister();
+    return registers()[activationRegister.offset()].jsValue();
+}
+
 #ifndef NDEBUG
 JSStack* CallFrame::stack()
 {

Deleted: trunk/Source/_javascript_Core/interpreter/CallFrameInlines.h (190554 => 190555)


--- trunk/Source/_javascript_Core/interpreter/CallFrameInlines.h	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/interpreter/CallFrameInlines.h	2015-10-04 23:25:44 UTC (rev 190555)
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef CallFrameInlines_h
-#define CallFrameInlines_h
-
-#include "CallFrame.h"
-#include "CodeBlock.h"
-
-namespace JSC  {
-
-inline bool CallFrame::callSiteBitsAreBytecodeOffset() const
-{
-    ASSERT(codeBlock());
-    switch (codeBlock()->jitType()) {
-    case JITCode::InterpreterThunk:
-    case JITCode::BaselineJIT:
-        return true;
-    case JITCode::None:
-    case JITCode::HostCallThunk:
-        RELEASE_ASSERT_NOT_REACHED();
-        return false;
-    default:
-        return false;
-    }
-
-    RELEASE_ASSERT_NOT_REACHED();
-    return false;
-}
-
-inline bool CallFrame::callSiteBitsAreCodeOriginIndex() const
-{
-    ASSERT(codeBlock());
-    switch (codeBlock()->jitType()) {
-    case JITCode::DFGJIT:
-    case JITCode::FTLJIT:
-        return true;
-    case JITCode::None:
-    case JITCode::HostCallThunk:
-        RELEASE_ASSERT_NOT_REACHED();
-        return false;
-    default:
-        return false;
-    }
-
-    RELEASE_ASSERT_NOT_REACHED();
-    return false;
-}
-
-inline unsigned CallFrame::callSiteAsRawBits() const
-{
-    return this[JSStack::ArgumentCount].tag();
-}
-
-inline CallSiteIndex CallFrame::callSiteIndex() const
-{
-    return CallSiteIndex(callSiteAsRawBits());
-}
-
-inline bool CallFrame::hasActivation() const
-{
-    JSValue activation = uncheckedActivation();
-    return !!activation && activation.isCell();
-}
-
-inline JSValue CallFrame::uncheckedActivation() const
-{
-    CodeBlock* codeBlock = this->codeBlock();
-    RELEASE_ASSERT(codeBlock->needsActivation());
-    VirtualRegister activationRegister = codeBlock->activationRegister();
-    return registers()[activationRegister.offset()].jsValue();
-}
-
-} // namespace JSC
-
-#endif // CallFrameInlines_h

Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -32,7 +32,6 @@
 
 #include "BatchedTransitionOptimizer.h"
 #include "CallFrameClosure.h"
-#include "CallFrameInlines.h"
 #include "ClonedArguments.h"
 #include "CodeBlock.h"
 #include "DirectArguments.h"

Modified: trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/interpreter/StackVisitor.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "StackVisitor.h"
 
-#include "CallFrameInlines.h"
 #include "ClonedArguments.h"
 #include "Executable.h"
 #include "InlineCallFrame.h"

Modified: trunk/Source/_javascript_Core/runtime/DirectArguments.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/runtime/DirectArguments.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/runtime/DirectArguments.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "DirectArguments.h"
 
+#include "CodeBlock.h"
 #include "CopyVisitorInlines.h"
 #include "GenericArgumentsInlines.h"
 #include "JSCInlines.h"

Modified: trunk/Source/_javascript_Core/runtime/ErrorInstance.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/runtime/ErrorInstance.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/runtime/ErrorInstance.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -21,6 +21,7 @@
 #include "config.h"
 #include "ErrorInstance.h"
 
+#include "CodeBlock.h"
 #include "JSScope.h"
 #include "JSCInlines.h"
 #include "JSGlobalObjectFunctions.h"

Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/runtime/JSArray.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -26,6 +26,7 @@
 #include "ArrayPrototype.h"
 #include "ButterflyInlines.h"
 #include "CachedCall.h"
+#include "CodeBlock.h"
 #include "CopiedSpace.h"
 #include "Error.h"
 #include "Executable.h"

Modified: trunk/Source/_javascript_Core/runtime/JSCInlines.h (190554 => 190555)


--- trunk/Source/_javascript_Core/runtime/JSCInlines.h	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/runtime/JSCInlines.h	2015-10-04 23:25:44 UTC (rev 190555)
@@ -37,7 +37,6 @@
 // In fact, it can make a lot of sense: outside of JSC, this file becomes a kind of umbrella
 // header that pulls in most (all?) of the interesting things in JSC.
 
-#include "CallFrameInlines.h"
 #include "ExceptionHelpers.h"
 #include "GCIncomingRefCountedInlines.h"
 #include "HeapInlines.h"

Modified: trunk/Source/_javascript_Core/runtime/LiteralParser.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/runtime/LiteralParser.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/runtime/LiteralParser.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -28,6 +28,7 @@
 #include "LiteralParser.h"
 
 #include "ButterflyInlines.h"
+#include "CodeBlock.h"
 #include "CopiedSpaceInlines.h"
 #include "JSArray.h"
 #include "JSString.h"

Modified: trunk/Source/_javascript_Core/runtime/NullSetterFunction.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/runtime/NullSetterFunction.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/runtime/NullSetterFunction.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "NullSetterFunction.h"
 
+#include "CodeBlock.h"
 #include "Error.h"
 #include "JSCInlines.h"
 #include "JSCJSValueInlines.h"

Modified: trunk/Source/_javascript_Core/tools/JSDollarVMPrototype.cpp (190554 => 190555)


--- trunk/Source/_javascript_Core/tools/JSDollarVMPrototype.cpp	2015-10-04 22:30:17 UTC (rev 190554)
+++ trunk/Source/_javascript_Core/tools/JSDollarVMPrototype.cpp	2015-10-04 23:25:44 UTC (rev 190555)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "JSDollarVMPrototype.h"
 
+#include "CodeBlock.h"
 #include "Heap.h"
 #include "HeapIterationScope.h"
 #include "JSCInlines.h"
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to