CodeBlock.h shouldn't be included from everywhere
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Oct 2015 23:25:44 +0000 (23:25 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 4 Oct 2015 23:25:44 +0000 (23:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149785

Reviewed by Andreas Kling.

* JavaScriptCore.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:

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

15 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp
Source/JavaScriptCore/dfg/DFGAdaptiveStructureWatchpoint.cpp
Source/JavaScriptCore/interpreter/CallFrame.cpp
Source/JavaScriptCore/interpreter/CallFrameInlines.h [deleted file]
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/interpreter/StackVisitor.cpp
Source/JavaScriptCore/runtime/DirectArguments.cpp
Source/JavaScriptCore/runtime/ErrorInstance.cpp
Source/JavaScriptCore/runtime/JSArray.cpp
Source/JavaScriptCore/runtime/JSCInlines.h
Source/JavaScriptCore/runtime/LiteralParser.cpp
Source/JavaScriptCore/runtime/NullSetterFunction.cpp
Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp

index 8a3946a..9dd9eaf 100644 (file)
@@ -1,3 +1,32 @@
+2015-10-04  Filip Pizlo  <fpizlo@apple.com>
+
+        CodeBlock.h shouldn't be included from everywhere
+        https://bugs.webkit.org/show_bug.cgi?id=149785
+
+        Reviewed by Andreas Kling.
+
+        * JavaScriptCore.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  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r190522.
index a7cc8f2..5ba0b7d 100644 (file)
                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, ); }; };
                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>"; };
                                1429D8DB0ED2205B00B89619 /* CallFrame.cpp */,
                                1429D8DC0ED2205B00B89619 /* CallFrame.h */,
                                A7F869EC0F95C2EC00558697 /* CallFrameClosure.h */,
-                               A7C1EAEA17987AB600299DB2 /* CallFrameInlines.h */,
                                1429D7D30ED2128200B89619 /* Interpreter.cpp */,
                                1429D77B0ED20D7300B89619 /* Interpreter.h */,
                                1429D85B0ED218E900B89619 /* JSStack.cpp */,
                                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 */,
index 6bc93b5..e2a5474 100644 (file)
@@ -28,6 +28,7 @@
 
 #if ENABLE(DFG_JIT)
 
+#include "CodeBlock.h"
 #include "JSCInlines.h"
 
 namespace JSC { namespace DFG {
index 359d4ff..f557587 100644 (file)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "CallFrame.h"
 
-#include "CallFrameInlines.h"
 #include "CodeBlock.h"
 #include "InlineCallFrame.h"
 #include "Interpreter.h"
 
 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()
 {
diff --git a/Source/JavaScriptCore/interpreter/CallFrameInlines.h b/Source/JavaScriptCore/interpreter/CallFrameInlines.h
deleted file mode 100644 (file)
index 8b35948..0000000
+++ /dev/null
@@ -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
index 04be8c8..d3a6085 100644 (file)
@@ -32,7 +32,6 @@
 
 #include "BatchedTransitionOptimizer.h"
 #include "CallFrameClosure.h"
-#include "CallFrameInlines.h"
 #include "ClonedArguments.h"
 #include "CodeBlock.h"
 #include "DirectArguments.h"
index 3730721..e686e49 100644 (file)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "StackVisitor.h"
 
-#include "CallFrameInlines.h"
 #include "ClonedArguments.h"
 #include "Executable.h"
 #include "InlineCallFrame.h"
index bb61e4f..240d51d 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "DirectArguments.h"
 
+#include "CodeBlock.h"
 #include "CopyVisitorInlines.h"
 #include "GenericArgumentsInlines.h"
 #include "JSCInlines.h"
index 2bf1493..c0549d8 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #include "ErrorInstance.h"
 
+#include "CodeBlock.h"
 #include "JSScope.h"
 #include "JSCInlines.h"
 #include "JSGlobalObjectFunctions.h"
index 2c5a19a..daa87ba 100644 (file)
@@ -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"
index e9fabb5..6b91962 100644 (file)
@@ -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"
index 3aed10d..f554983 100644 (file)
@@ -28,6 +28,7 @@
 #include "LiteralParser.h"
 
 #include "ButterflyInlines.h"
+#include "CodeBlock.h"
 #include "CopiedSpaceInlines.h"
 #include "JSArray.h"
 #include "JSString.h"
index 118fb15..059b74f 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "NullSetterFunction.h"
 
+#include "CodeBlock.h"
 #include "Error.h"
 #include "JSCInlines.h"
 #include "JSCJSValueInlines.h"
index db239ea..1513466 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "JSDollarVMPrototype.h"
 
+#include "CodeBlock.h"
 #include "Heap.h"
 #include "HeapIterationScope.h"
 #include "JSCInlines.h"