Title: [199303] trunk/Source/_javascript_Core
Revision
199303
Author
fpi...@apple.com
Date
2016-04-11 12:31:04 -0700 (Mon, 11 Apr 2016)

Log Message

It should be possible to edit StructureStubInfo without recompiling the world
https://bugs.webkit.org/show_bug.cgi?id=156470

Reviewed by Keith Miller.

This change makes it less painful to make changes to the IC code. It used to be that any
change to StructureStubInfo caused every JIT-related file to get recompiled. Now only a
smaller set of files - ones that actually peek into StructureStubInfo - will recompile. This
is mainly because CodeBlock.h no longer includes StructureStubInfo.h.

* bytecode/ByValInfo.h:
* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
* bytecode/GetByIdStatus.cpp:
* bytecode/GetByIdStatus.h:
* bytecode/PutByIdStatus.cpp:
* bytecode/PutByIdStatus.h:
* bytecode/StructureStubInfo.h:
(JSC::getStructureStubInfoCodeOrigin):
* dfg/DFGByteCodeParser.cpp:
* dfg/DFGJITCompiler.cpp:
* dfg/DFGOSRExitCompilerCommon.cpp:
* dfg/DFGSpeculativeJIT.h:
* ftl/FTLLowerDFGToB3.cpp:
* ftl/FTLSlowPathCall.h:
* jit/IntrinsicEmitter.cpp:
* jit/JITInlineCacheGenerator.cpp:
* jit/JITInlineCacheGenerator.h:
* jit/JITOperations.cpp:
* jit/JITPropertyAccess.cpp:
* jit/JITPropertyAccess32_64.cpp:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (199302 => 199303)


--- trunk/Source/_javascript_Core/ChangeLog	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-11 19:31:04 UTC (rev 199303)
@@ -1,3 +1,37 @@
+2016-04-11  Filip Pizlo  <fpi...@apple.com>
+
+        It should be possible to edit StructureStubInfo without recompiling the world
+        https://bugs.webkit.org/show_bug.cgi?id=156470
+
+        Reviewed by Keith Miller.
+
+        This change makes it less painful to make changes to the IC code. It used to be that any
+        change to StructureStubInfo caused every JIT-related file to get recompiled. Now only a
+        smaller set of files - ones that actually peek into StructureStubInfo - will recompile. This
+        is mainly because CodeBlock.h no longer includes StructureStubInfo.h.
+
+        * bytecode/ByValInfo.h:
+        * bytecode/CodeBlock.cpp:
+        * bytecode/CodeBlock.h:
+        * bytecode/GetByIdStatus.cpp:
+        * bytecode/GetByIdStatus.h:
+        * bytecode/PutByIdStatus.cpp:
+        * bytecode/PutByIdStatus.h:
+        * bytecode/StructureStubInfo.h:
+        (JSC::getStructureStubInfoCodeOrigin):
+        * dfg/DFGByteCodeParser.cpp:
+        * dfg/DFGJITCompiler.cpp:
+        * dfg/DFGOSRExitCompilerCommon.cpp:
+        * dfg/DFGSpeculativeJIT.h:
+        * ftl/FTLLowerDFGToB3.cpp:
+        * ftl/FTLSlowPathCall.h:
+        * jit/IntrinsicEmitter.cpp:
+        * jit/JITInlineCacheGenerator.cpp:
+        * jit/JITInlineCacheGenerator.h:
+        * jit/JITOperations.cpp:
+        * jit/JITPropertyAccess.cpp:
+        * jit/JITPropertyAccess32_64.cpp:
+
 2016-04-11  Skachkov Oleksandr  <gskach...@gmail.com>
 
         Remove NewArrowFunction from DFG IR

Modified: trunk/Source/_javascript_Core/bytecode/ByValInfo.h (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/ByValInfo.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/ByValInfo.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -32,12 +32,13 @@
 #include "IndexingType.h"
 #include "JITStubRoutine.h"
 #include "Structure.h"
-#include "StructureStubInfo.h"
 
 namespace JSC {
 
 #if ENABLE(JIT)
 
+class StructureStubInfo;
+
 enum JITArrayMode {
     JITInt32,
     JITDouble,

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -59,6 +59,7 @@
 #include "Repatch.h"
 #include "SlotVisitorInlines.h"
 #include "StackVisitor.h"
+#include "StructureStubInfo.h"
 #include "TypeLocationCache.h"
 #include "TypeProfiler.h"
 #include "UnlinkedInstructionStream.h"

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2016 Apple Inc. All rights reserved.
  * Copyright (C) 2008 Cameron Zwarich <cwzwar...@uwaterloo.ca>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,6 @@
 #include "ProfilerJettisonReason.h"
 #include "PutPropertySlot.h"
 #include "RegExpObject.h"
-#include "StructureStubInfo.h"
 #include "UnconditionalFinalizer.h"
 #include "ValueProfile.h"
 #include "VirtualRegister.h"
@@ -80,12 +79,17 @@
 namespace JSC {
 
 class ExecState;
+class JSModuleEnvironment;
 class LLIntOffsetsExtractor;
+class PCToCodeOriginMap;
 class RegisterAtOffsetList;
+class StructureStubInfo;
 class TypeLocation;
-class JSModuleEnvironment;
-class PCToCodeOriginMap;
 
+enum class AccessType : int8_t;
+
+typedef HashMap<CodeOrigin, StructureStubInfo*, CodeOriginApproximateHash> StubInfoMap;
+
 enum ReoptimizationMode { DontCountReoptimization, CountReoptimization };
 
 class CodeBlock : public JSCell {

Modified: trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -33,6 +33,7 @@
 #include "LLIntData.h"
 #include "LowLevelInterpreter.h"
 #include "PolymorphicAccess.h"
+#include "StructureStubInfo.h"
 #include <wtf/ListDump.h>
 
 namespace JSC {

Modified: trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -31,12 +31,14 @@
 #include "ConcurrentJITLock.h"
 #include "ExitingJITType.h"
 #include "GetByIdVariant.h"
-#include "StructureStubInfo.h"
 
 namespace JSC {
 
 class CodeBlock;
+class StructureStubInfo;
 
+typedef HashMap<CodeOrigin, StructureStubInfo*, CodeOriginApproximateHash> StubInfoMap;
+
 class GetByIdStatus {
 public:
     enum State {

Modified: trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -34,6 +34,7 @@
 #include "PolymorphicAccess.h"
 #include "Structure.h"
 #include "StructureChain.h"
+#include "StructureStubInfo.h"
 #include <wtf/ListDump.h>
 
 namespace JSC {

Modified: trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -29,7 +29,6 @@
 #include "CallLinkStatus.h"
 #include "ExitingJITType.h"
 #include "PutByIdVariant.h"
-#include "StructureStubInfo.h"
 #include <wtf/text/StringImpl.h>
 
 namespace JSC {
@@ -39,7 +38,10 @@
 class JSGlobalObject;
 class Structure;
 class StructureChain;
+class StructureStubInfo;
 
+typedef HashMap<CodeOrigin, StructureStubInfo*, CodeOriginApproximateHash> StubInfoMap;
+
 class PutByIdStatus {
 public:
     enum State {

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h (199302 => 199303)


--- trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -168,14 +168,14 @@
     return structureStubInfo.codeOrigin;
 }
 
-typedef HashMap<CodeOrigin, StructureStubInfo*, CodeOriginApproximateHash> StubInfoMap;
-
 #else
 
-typedef HashMap<int, void*> StubInfoMap;
+class StructureStubInfo;
 
 #endif // ENABLE(JIT)
 
+typedef HashMap<CodeOrigin, StructureStubInfo*, CodeOriginApproximateHash> StubInfoMap;
+
 } // namespace JSC
 
 #endif // StructureStubInfo_h

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -50,6 +50,7 @@
 #include "PutByIdStatus.h"
 #include "StackAlignment.h"
 #include "StringConstructor.h"
+#include "StructureStubInfo.h"
 #include "Watchdog.h"
 #include <wtf/CommaPrinter.h>
 #include <wtf/HashMap.h>

Modified: trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -39,10 +39,11 @@
 #include "DFGSlowPathGenerator.h"
 #include "DFGSpeculativeJIT.h"
 #include "DFGThunks.h"
+#include "JSCInlines.h"
 #include "JSCJSValueInlines.h"
 #include "LinkBuffer.h"
 #include "MaxFrameExtentForSlowPathCall.h"
-#include "JSCInlines.h"
+#include "StructureStubInfo.h"
 #include "VM.h"
 
 namespace JSC { namespace DFG {

Modified: trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/dfg/DFGOSRExitCompilerCommon.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -33,6 +33,7 @@
 #include "JIT.h"
 #include "JSCJSValueInlines.h"
 #include "JSCInlines.h"
+#include "StructureStubInfo.h"
 
 namespace JSC { namespace DFG {
 

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h (199302 => 199303)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -40,6 +40,7 @@
 #include "MarkedAllocator.h"
 #include "PutKind.h"
 #include "SpillRegistersMode.h"
+#include "StructureStubInfo.h"
 #include "ValueRecovery.h"
 #include "VirtualRegister.h"
 

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -68,8 +68,9 @@
 #include "ScopedArguments.h"
 #include "ScopedArgumentsTable.h"
 #include "ScratchRegisterAllocator.h"
+#include "SetupVarargsFrame.h"
 #include "ShadowChicken.h"
-#include "SetupVarargsFrame.h"
+#include "StructureStubInfo.h"
 #include "VirtualRegister.h"
 #include "Watchdog.h"
 #include <atomic>

Modified: trunk/Source/_javascript_Core/ftl/FTLSlowPathCall.h (199302 => 199303)


--- trunk/Source/_javascript_Core/ftl/FTLSlowPathCall.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/ftl/FTLSlowPathCall.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -31,7 +31,6 @@
 #include "CCallHelpers.h"
 #include "FTLSlowPathCallKey.h"
 #include "JITOperations.h"
-#include "StructureStubInfo.h"
 
 namespace JSC { namespace FTL {
 

Modified: trunk/Source/_javascript_Core/jit/IntrinsicEmitter.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/jit/IntrinsicEmitter.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/jit/IntrinsicEmitter.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -37,6 +37,7 @@
 #include "JSCJSValueInlines.h"
 #include "JSCellInlines.h"
 #include "PolymorphicAccess.h"
+#include "StructureStubInfo.h"
 
 namespace JSC {
 

Modified: trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -31,6 +31,7 @@
 #include "CodeBlock.h"
 #include "LinkBuffer.h"
 #include "JSCInlines.h"
+#include "StructureStubInfo.h"
 
 namespace JSC {
 

Modified: trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.h (199302 => 199303)


--- trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.h	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/jit/JITInlineCacheGenerator.h	2016-04-11 19:31:04 UTC (rev 199303)
@@ -33,12 +33,16 @@
 #include "JSCJSValue.h"
 #include "PutKind.h"
 #include "RegisterSet.h"
-#include "StructureStubInfo.h"
 
 namespace JSC {
 
 class CodeBlock;
+class StructureStubInfo;
 
+struct CallSiteIndex;
+
+enum class AccessType : int8_t;
+
 class JITInlineCacheGenerator {
 protected:
     JITInlineCacheGenerator() { }

Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/jit/JITOperations.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -60,6 +60,7 @@
 #include "Repatch.h"
 #include "ScopedArguments.h"
 #include "ShadowChicken.h"
+#include "StructureStubInfo.h"
 #include "SuperSampler.h"
 #include "TestRunnerUtils.h"
 #include "TypeProfilerLog.h"

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -42,6 +42,7 @@
 #include "ScopedArguments.h"
 #include "ScopedArgumentsTable.h"
 #include "SlowPathCall.h"
+#include "StructureStubInfo.h"
 #include <wtf/StringPrintStream.h>
 
 

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (199302 => 199303)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2016-04-11 19:20:28 UTC (rev 199302)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp	2016-04-11 19:31:04 UTC (rev 199303)
@@ -40,6 +40,7 @@
 #include "LinkBuffer.h"
 #include "ResultType.h"
 #include "SlowPathCall.h"
+#include "StructureStubInfo.h"
 #include <wtf/StringPrintStream.h>
 
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to