Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (197364 => 197365)
--- trunk/Source/_javascript_Core/ChangeLog 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-02-29 22:14:59 UTC (rev 197365)
@@ -1,3 +1,28 @@
+2016-02-29 Filip Pizlo <fpi...@apple.com>
+
+ Make it cheap to #include "JITOperations.h"
+ https://bugs.webkit.org/show_bug.cgi?id=154836
+
+ Reviewed by Mark Lam.
+
+ Prior to this change, this header included the whole world even though it did't have any
+ definitions. This patch turns almost all of the includes into forward declarations. Right
+ now this header is very cheap to include.
+
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj:
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * dfg/DFGSpeculativeJIT.h:
+ * jit/JITOperations.cpp:
+ * jit/JITOperations.h:
+ * jit/Repatch.h:
+ * runtime/CommonSlowPaths.h:
+ (JSC::encodeResult): Deleted.
+ (JSC::decodeResult): Deleted.
+ * runtime/SlowPathReturnType.h: Added.
+ (JSC::encodeResult):
+ (JSC::decodeResult):
+
2016-02-28 Filip Pizlo <fpi...@apple.com>
FTL should be able to run everything in Octane/regexp
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj (197364 => 197365)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2016-02-29 22:14:59 UTC (rev 197365)
@@ -1806,6 +1806,7 @@
<ClInclude Include="..\runtime\SetIteratorPrototype.h" />
<ClInclude Include="..\runtime\SetPrototype.h" />
<ClInclude Include="..\runtime\SimpleTypedArrayController.h" />
+ <ClInclude Include="..\runtime\SlowPathReturnType.h" />
<ClInclude Include="..\runtime\SmallStrings.h" />
<ClInclude Include="..\runtime\SparseArrayValueMap.h" />
<ClInclude Include="..\runtime\StackAlignment.h" />
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters (197364 => 197365)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2016-02-29 22:14:59 UTC (rev 197365)
@@ -3199,6 +3199,9 @@
<ClInclude Include="..\runtime\SmallStrings.h">
<Filter>runtime</Filter>
</ClInclude>
+ <ClInclude Include="..\runtime\SlowPathReturnType.h">
+ <Filter>runtime</Filter>
+ </ClInclude>
<ClInclude Include="..\runtime\SparseArrayValueMap.h">
<Filter>runtime</Filter>
</ClInclude>
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (197364 => 197365)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2016-02-29 22:14:59 UTC (rev 197365)
@@ -403,6 +403,7 @@
0F5A52D017ADD717008ECB2D /* CopyToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5A52CF17ADD717008ECB2D /* CopyToken.h */; settings = {ATTRIBUTES = (Private, ); }; };
0F5A6283188C98D40072C9DF /* FTLValueRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5A6281188C98D40072C9DF /* FTLValueRange.cpp */; };
0F5A6284188C98D40072C9DF /* FTLValueRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5A6282188C98D40072C9DF /* FTLValueRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 0F5B4A331C84F0D600F1B17E /* SlowPathReturnType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5B4A321C84F0D600F1B17E /* SlowPathReturnType.h */; };
0F5D085D1B8CF99D001143B4 /* DFGNodeOrigin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5D085C1B8CF99D001143B4 /* DFGNodeOrigin.cpp */; };
0F5EF91E16878F7A003E5C25 /* JITThunks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */; };
0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5EF91C16878F78003E5C25 /* JITThunks.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2542,6 +2543,7 @@
0F5A52CF17ADD717008ECB2D /* CopyToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CopyToken.h; sourceTree = "<group>"; };
0F5A6281188C98D40072C9DF /* FTLValueRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLValueRange.cpp; path = ftl/FTLValueRange.cpp; sourceTree = "<group>"; };
0F5A6282188C98D40072C9DF /* FTLValueRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLValueRange.h; path = ftl/FTLValueRange.h; sourceTree = "<group>"; };
+ 0F5B4A321C84F0D600F1B17E /* SlowPathReturnType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlowPathReturnType.h; sourceTree = "<group>"; };
0F5D085C1B8CF99D001143B4 /* DFGNodeOrigin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGNodeOrigin.cpp; path = dfg/DFGNodeOrigin.cpp; sourceTree = "<group>"; };
0F5EF91B16878F78003E5C25 /* JITThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITThunks.cpp; sourceTree = "<group>"; };
0F5EF91C16878F78003E5C25 /* JITThunks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITThunks.h; sourceTree = "<group>"; };
@@ -5872,6 +5874,7 @@
A7299DA017D12848005F5FF9 /* SetPrototype.h */,
0F2B66D617B6B5AB00A7AE3F /* SimpleTypedArrayController.cpp */,
0F2B66D717B6B5AB00A7AE3F /* SimpleTypedArrayController.h */,
+ 0F5B4A321C84F0D600F1B17E /* SlowPathReturnType.h */,
93303FE80E6A72B500786E6A /* SmallStrings.cpp */,
93303FEA0E6A72C000786E6A /* SmallStrings.h */,
0F0CD4C315F6B6B50032F1C0 /* SparseArrayValueMap.cpp */,
@@ -7931,6 +7934,7 @@
BC18C46B0E16F5CD00B34460 /* SymbolTable.h in Headers */,
A784A26411D16622005776AC /* SyntaxChecker.h in Headers */,
70ECA6081AFDBEA200449739 /* TemplateRegistry.h in Headers */,
+ 0F5B4A331C84F0D600F1B17E /* SlowPathReturnType.h in Headers */,
70ECA6091AFDBEA200449739 /* TemplateRegistryKey.h in Headers */,
0F24E54F17EE274900ABB217 /* TempRegisterSet.h in Headers */,
0FA2C17C17D7CF84009D015F /* TestRunnerUtils.h in Headers */,
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h (197364 => 197365)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h 2016-02-29 22:14:59 UTC (rev 197365)
@@ -39,6 +39,7 @@
#include "JITOperations.h"
#include "MarkedAllocator.h"
#include "PutKind.h"
+#include "SpillRegistersMode.h"
#include "ValueRecovery.h"
#include "VirtualRegister.h"
Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (197364 => 197365)
--- trunk/Source/_javascript_Core/jit/JITOperations.cpp 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp 2016-02-29 22:14:59 UTC (rev 197365)
@@ -29,6 +29,7 @@
#if ENABLE(JIT)
#include "ArrayConstructor.h"
+#include "CommonSlowPaths.h"
#include "DFGCompilationMode.h"
#include "DFGDriver.h"
#include "DFGOSREntry.h"
@@ -42,6 +43,7 @@
#include "GetterSetter.h"
#include "HostCallReturnValue.h"
#include "JIT.h"
+#include "JITExceptions.h"
#include "JITToDFGDeferredCompilationCallback.h"
#include "JSCInlines.h"
#include "JSGeneratorFunction.h"
Modified: trunk/Source/_javascript_Core/jit/JITOperations.h (197364 => 197365)
--- trunk/Source/_javascript_Core/jit/JITOperations.h 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/jit/JITOperations.h 2016-02-29 22:14:59 UTC (rev 197365)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,21 +28,33 @@
#if ENABLE(JIT)
-#include "CallFrame.h"
-#include "CommonSlowPaths.h"
-#include "JITExceptions.h"
-#include "JSArray.h"
-#include "JSCJSValue.h"
-#include "MacroAssembler.h"
-#include "PutKind.h"
-#include "SpillRegistersMode.h"
-#include "StructureStubInfo.h"
+#include "MacroAssemblerCodeRef.h"
+#include "PropertyOffset.h"
+#include "SlowPathReturnType.h"
+#include "TypedArrayType.h"
+#include <wtf/text/UniquedStringImpl.h>
-
namespace JSC {
class ArrayAllocationProfile;
+class ArrayProfile;
+class CallLinkInfo;
+class CodeBlock;
+class ExecState;
+class JSArray;
+class JSFunction;
+class JSLexicalEnvironment;
+class JSScope;
+class Register;
+class StructureStubInfo;
+class SymbolTable;
+class WatchpointSet;
+struct ByValInfo;
+struct InlineCallFrame;
+
+typedef ExecState CallFrame;
+
#if CALLING_CONVENTION_IS_STDCALL
#define JIT_OPERATION CDECL
#else
Modified: trunk/Source/_javascript_Core/jit/Repatch.h (197364 => 197365)
--- trunk/Source/_javascript_Core/jit/Repatch.h 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/jit/Repatch.h 2016-02-29 22:14:59 UTC (rev 197365)
@@ -31,6 +31,7 @@
#include "CCallHelpers.h"
#include "CallVariant.h"
#include "JITOperations.h"
+#include "PutKind.h"
namespace JSC {
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h (197364 => 197365)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h 2016-02-29 21:32:28 UTC (rev 197364)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h 2016-02-29 22:14:59 UTC (rev 197365)
@@ -30,6 +30,7 @@
#include "CodeSpecializationKind.h"
#include "ExceptionHelpers.h"
#include "JSStackInlines.h"
+#include "SlowPathReturnType.h"
#include "StackAlignment.h"
#include "Symbol.h"
#include "VM.h"
@@ -175,57 +176,6 @@
class ExecState;
struct Instruction;
-#if USE(JSVALUE64)
-// According to C++ rules, a type used for the return signature of function with C linkage (i.e.
-// 'extern "C"') needs to be POD; hence putting any constructors into it could cause either compiler
-// warnings, or worse, a change in the ABI used to return these types.
-struct SlowPathReturnType {
- void* a;
- void* b;
-};
-
-inline SlowPathReturnType encodeResult(void* a, void* b)
-{
- SlowPathReturnType result;
- result.a = a;
- result.b = b;
- return result;
-}
-
-inline void decodeResult(SlowPathReturnType result, void*& a, void*& b)
-{
- a = result.a;
- b = result.b;
-}
-
-#else // USE(JSVALUE32_64)
-typedef int64_t SlowPathReturnType;
-
-typedef union {
- struct {
- void* a;
- void* b;
- } pair;
- int64_t i;
-} SlowPathReturnTypeEncoding;
-
-inline SlowPathReturnType encodeResult(void* a, void* b)
-{
- SlowPathReturnTypeEncoding u;
- u.pair.a = a;
- u.pair.b = b;
- return u.i;
-}
-
-inline void decodeResult(SlowPathReturnType result, void*& a, void*& b)
-{
- SlowPathReturnTypeEncoding u;
- u.i = result;
- a = u.pair.a;
- b = u.pair.b;
-}
-#endif // USE(JSVALUE32_64)
-
#define SLOW_PATH
#define SLOW_PATH_DECL(name) \
Added: trunk/Source/_javascript_Core/runtime/SlowPathReturnType.h (0 => 197365)
--- trunk/Source/_javascript_Core/runtime/SlowPathReturnType.h (rev 0)
+++ trunk/Source/_javascript_Core/runtime/SlowPathReturnType.h 2016-02-29 22:14:59 UTC (rev 197365)
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2016 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 SlowPathReturnType_h
+#define SlowPathReturnType_h
+
+#include <wtf/StdLibExtras.h>
+
+namespace JSC {
+
+#if USE(JSVALUE64)
+// According to C++ rules, a type used for the return signature of function with C linkage (i.e.
+// 'extern "C"') needs to be POD; hence putting any constructors into it could cause either compiler
+// warnings, or worse, a change in the ABI used to return these types.
+struct SlowPathReturnType {
+ void* a;
+ void* b;
+};
+
+inline SlowPathReturnType encodeResult(void* a, void* b)
+{
+ SlowPathReturnType result;
+ result.a = a;
+ result.b = b;
+ return result;
+}
+
+inline void decodeResult(SlowPathReturnType result, void*& a, void*& b)
+{
+ a = result.a;
+ b = result.b;
+}
+
+#else // USE(JSVALUE32_64)
+typedef int64_t SlowPathReturnType;
+
+typedef union {
+ struct {
+ void* a;
+ void* b;
+ } pair;
+ int64_t i;
+} SlowPathReturnTypeEncoding;
+
+inline SlowPathReturnType encodeResult(void* a, void* b)
+{
+ SlowPathReturnTypeEncoding u;
+ u.pair.a = a;
+ u.pair.b = b;
+ return u.i;
+}
+
+inline void decodeResult(SlowPathReturnType result, void*& a, void*& b)
+{
+ SlowPathReturnTypeEncoding u;
+ u.i = result;
+ a = u.pair.a;
+ b = u.pair.b;
+}
+#endif // USE(JSVALUE32_64)
+
+} // namespace JSC
+
+#endif // SlowPathReturnType_h