Title: [238992] releases/WebKitGTK/webkit-2.22/Source/_javascript_Core
Revision
238992
Author
[email protected]
Date
2018-12-07 16:25:55 -0800 (Fri, 07 Dec 2018)

Log Message

Merge r236576 - DFG::OSREntry::m_machineCodeOffset should be a CodeLocation.
https://bugs.webkit.org/show_bug.cgi?id=190054
<rdar://problem/44803543>

Reviewed by Saam Barati.

* dfg/DFGJITCode.h:
(JSC::DFG::JITCode::appendOSREntryData):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::noticeOSREntry):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::OSREntryData::dumpInContext const):
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntry.h:
* runtime/JSCPtrTag.h:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog (238991 => 238992)


--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog	2018-12-08 00:25:52 UTC (rev 238991)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog	2018-12-08 00:25:55 UTC (rev 238992)
@@ -1,3 +1,21 @@
+2018-09-27  Mark Lam  <[email protected]>
+
+        DFG::OSREntry::m_machineCodeOffset should be a CodeLocation.
+        https://bugs.webkit.org/show_bug.cgi?id=190054
+        <rdar://problem/44803543>
+
+        Reviewed by Saam Barati.
+
+        * dfg/DFGJITCode.h:
+        (JSC::DFG::JITCode::appendOSREntryData):
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::noticeOSREntry):
+        * dfg/DFGOSREntry.cpp:
+        (JSC::DFG::OSREntryData::dumpInContext const):
+        (JSC::DFG::prepareOSREntry):
+        * dfg/DFGOSREntry.h:
+        * runtime/JSCPtrTag.h:
+
 2018-09-27  Saam barati  <[email protected]>
 
         DFG::OSRExit::m_patchableCodeOffset should not be an int

Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCode.h (238991 => 238992)


--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCode.h	2018-12-08 00:25:52 UTC (rev 238991)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCode.h	2018-12-08 00:25:55 UTC (rev 238992)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -54,11 +54,11 @@
     CommonData* dfgCommon() override;
     JITCode* dfg() override;
     
-    OSREntryData* appendOSREntryData(unsigned bytecodeIndex, unsigned machineCodeOffset)
+    OSREntryData* appendOSREntryData(unsigned bytecodeIndex, CodeLocationLabel<OSREntryPtrTag> machineCode)
     {
         DFG::OSREntryData entry;
         entry.m_bytecodeIndex = bytecodeIndex;
-        entry.m_machineCodeOffset = machineCodeOffset;
+        entry.m_machineCode = machineCode;
         osrEntry.append(entry);
         return &osrEntry.last();
     }

Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (238991 => 238992)


--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2018-12-08 00:25:52 UTC (rev 238991)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2018-12-08 00:25:55 UTC (rev 238992)
@@ -574,7 +574,7 @@
     if (!basicBlock.intersectionOfCFAHasVisited)
         return;
 
-    OSREntryData* entry = m_jitCode->appendOSREntryData(basicBlock.bytecodeBegin, linkBuffer.offsetOf(blockHead));
+    OSREntryData* entry = m_jitCode->appendOSREntryData(basicBlock.bytecodeBegin, linkBuffer.locationOf<OSREntryPtrTag>(blockHead));
 
     entry->m_expectedValues = basicBlock.intersectionOfPastValuesAtHead;
         

Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSREntry.cpp (238991 => 238992)


--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2018-12-08 00:25:52 UTC (rev 238991)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2018-12-08 00:25:55 UTC (rev 238992)
@@ -42,7 +42,7 @@
 
 void OSREntryData::dumpInContext(PrintStream& out, DumpContext* context) const
 {
-    out.print("bc#", m_bytecodeIndex, ", machine code offset = ", m_machineCodeOffset);
+    out.print("bc#", m_bytecodeIndex, ", machine code = ", RawPointer(m_machineCode.executableAddress()));
     out.print(", stack rules = [");
     
     auto printOperand = [&] (VirtualRegister reg) {
@@ -269,11 +269,12 @@
     
     *bitwise_cast<size_t*>(scratch + 0) = frameSize;
     
-    void* targetPC = codeBlock->jitCode()->executableAddressAtOffset(entry->m_machineCodeOffset);
+    void* targetPC = entry->m_machineCode.executableAddress();
+    RELEASE_ASSERT(codeBlock->jitCode()->contains(entry->m_machineCode.untaggedExecutableAddress()));
     if (Options::verboseOSR())
         dataLogF("    OSR using target PC %p.\n", targetPC);
     RELEASE_ASSERT(targetPC);
-    *bitwise_cast<void**>(scratch + 1) = retagCodePtr(targetPC, JSEntryPtrTag, bitwise_cast<PtrTag>(exec));
+    *bitwise_cast<void**>(scratch + 1) = retagCodePtr(targetPC, OSREntryPtrTag, bitwise_cast<PtrTag>(exec));
 
     Register* pivot = scratch + 2 + CallFrame::headerSizeInRegisters;
     

Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSREntry.h (238991 => 238992)


--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSREntry.h	2018-12-08 00:25:52 UTC (rev 238991)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/dfg/DFGOSREntry.h	2018-12-08 00:25:55 UTC (rev 238992)
@@ -54,7 +54,7 @@
 
 struct OSREntryData {
     unsigned m_bytecodeIndex;
-    unsigned m_machineCodeOffset;
+    CodeLocationLabel<OSREntryPtrTag> m_machineCode;
     Operands<AbstractValue> m_expectedValues;
     // Use bitvectors here because they tend to only require one word.
     BitVector m_localsForcedDouble;

Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/runtime/JSCPtrTag.h (238991 => 238992)


--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/runtime/JSCPtrTag.h	2018-12-08 00:25:52 UTC (rev 238991)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/runtime/JSCPtrTag.h	2018-12-08 00:25:55 UTC (rev 238992)
@@ -45,6 +45,7 @@
     v(JSSwitchPtrTag) \
     v(LinkBufferPtrTag) \
     v(OperationPtrTag) \
+    v(OSREntryPtrTag) \
     v(OSRExitPtrTag) \
     v(PlatformRegistersLRPtrTag) \
     v(PlatformRegistersPCPtrTag) \
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to