Title: [236594] branches/safari-606-branch
- Revision
- 236594
- Author
- [email protected]
- Date
- 2018-09-28 00:01:59 -0700 (Fri, 28 Sep 2018)
Log Message
Cherry-pick r236554. rdar://problem/44855120
2018-09-27 Mark Lam <[email protected]>
JITMathIC should not use integer offsets into machine code.
https://bugs.webkit.org/show_bug.cgi?id=190030
<rdar://problem/44803307>
Reviewed by Saam Barati.
We'll replace them with CodeLocation smart pointers instead.
* jit/JITMathIC.h:
(JSC::isProfileEmpty):
Modified Paths
Property Changed
Diff
Index: branches/safari-606-branch
===================================================================
--- branches/safari-606-branch 2018-09-28 06:55:03 UTC (rev 236593)
+++ branches/safari-606-branch 2018-09-28 07:01:59 UTC (rev 236594)
Property changes: branches/safari-606-branch
Modified: svn:mergeinfo
-/trunk:53455,235254,235419,235666,236576,236587
\ No newline at end of property
+/trunk:53455,235254,235419,235666,236554,236576,236587
\ No newline at end of property
Modified: branches/safari-606-branch/Source/_javascript_Core/ChangeLog (236593 => 236594)
--- branches/safari-606-branch/Source/_javascript_Core/ChangeLog 2018-09-28 06:55:03 UTC (rev 236593)
+++ branches/safari-606-branch/Source/_javascript_Core/ChangeLog 2018-09-28 07:01:59 UTC (rev 236594)
@@ -1,5 +1,22 @@
2018-09-27 Mark Lam <[email protected]>
+ Cherry-pick r236554. rdar://problem/44855120
+
+ 2018-09-27 Mark Lam <[email protected]>
+
+ JITMathIC should not use integer offsets into machine code.
+ https://bugs.webkit.org/show_bug.cgi?id=190030
+ <rdar://problem/44803307>
+
+ Reviewed by Saam Barati.
+
+ We'll replace them with CodeLocation smart pointers instead.
+
+ * jit/JITMathIC.h:
+ (JSC::isProfileEmpty):
+
+2018-09-27 Mark Lam <[email protected]>
+
Cherry-pick r236587. rdar://problem/44855118
2018-09-27 Mark Lam <[email protected]>
Modified: branches/safari-606-branch/Source/_javascript_Core/jit/JITMathIC.h (236593 => 236594)
--- branches/safari-606-branch/Source/_javascript_Core/jit/JITMathIC.h 2018-09-28 06:55:03 UTC (rev 236593)
+++ branches/safari-606-branch/Source/_javascript_Core/jit/JITMathIC.h 2018-09-28 07:01:59 UTC (rev 236594)
@@ -62,10 +62,10 @@
{
}
- CodeLocationLabel<JSInternalPtrTag> doneLocation() { return m_inlineStart.labelAtOffset(m_inlineSize); }
- CodeLocationLabel<JSInternalPtrTag> slowPathStartLocation() { return m_inlineStart.labelAtOffset(m_deltaFromStartToSlowPathStart); }
- CodeLocationCall<JSInternalPtrTag> slowPathCallLocation() { return m_inlineStart.callAtOffset(m_deltaFromStartToSlowPathCallLocation); }
-
+ CodeLocationLabel<JSInternalPtrTag> doneLocation() { return m_inlineEnd; }
+ CodeLocationCall<JSInternalPtrTag> slowPathCallLocation() { return m_slowPathCallLocation; }
+ CodeLocationLabel<JSInternalPtrTag> slowPathStartLocation() { return m_slowPathStartLocation; }
+
bool generateInline(CCallHelpers& jit, MathICGenerationState& state, bool shouldEmitProfiling = true)
{
#if CPU(ARM_TRADITIONAL)
@@ -136,7 +136,7 @@
auto jump = jit.jump();
// We don't need a nop sled here because nobody should be jumping into the middle of an IC.
bool needsBranchCompaction = false;
- RELEASE_ASSERT(jit.m_assembler.buffer().codeSize() <= static_cast<size_t>(m_inlineSize));
+ RELEASE_ASSERT(jit.m_assembler.buffer().codeSize() <= static_cast<size_t>(MacroAssembler::differenceBetweenCodePtr(m_inlineStart, m_inlineEnd)));
LinkBuffer linkBuffer(jit, m_inlineStart, jit.m_assembler.buffer().codeSize(), JITCompilationMustSucceed, needsBranchCompaction);
RELEASE_ASSERT(linkBuffer.isValid());
linkBuffer.link(jump, CodeLocationLabel<JITStubRoutinePtrTag>(m_code.code()));
@@ -224,14 +224,11 @@
CodeLocationLabel<JSInternalPtrTag> start = linkBuffer.locationOf<JSInternalPtrTag>(state.fastPathStart);
m_inlineStart = start;
- m_inlineSize = MacroAssembler::differenceBetweenCodePtr(
- start, linkBuffer.locationOf<NoPtrTag>(state.fastPathEnd));
- ASSERT(m_inlineSize > 0);
+ m_inlineEnd = linkBuffer.locationOf<JSInternalPtrTag>(state.fastPathEnd);
+ ASSERT(m_inlineEnd.untaggedExecutableAddress() > m_inlineStart.untaggedExecutableAddress());
- m_deltaFromStartToSlowPathCallLocation = MacroAssembler::differenceBetweenCodePtr(
- start, linkBuffer.locationOf<NoPtrTag>(state.slowPathCall));
- m_deltaFromStartToSlowPathStart = MacroAssembler::differenceBetweenCodePtr(
- start, linkBuffer.locationOf<NoPtrTag>(state.slowPathStart));
+ m_slowPathCallLocation = linkBuffer.locationOf<JSInternalPtrTag>(state.slowPathCall);
+ m_slowPathStartLocation = linkBuffer.locationOf<JSInternalPtrTag>(state.slowPathStart);
}
ArithProfile* arithProfile() const { return m_arithProfile; }
@@ -252,9 +249,9 @@
Instruction* m_instruction;
MacroAssemblerCodeRef<JITStubRoutinePtrTag> m_code;
CodeLocationLabel<JSInternalPtrTag> m_inlineStart;
- int32_t m_inlineSize;
- int32_t m_deltaFromStartToSlowPathCallLocation;
- int32_t m_deltaFromStartToSlowPathStart;
+ CodeLocationLabel<JSInternalPtrTag> m_inlineEnd;
+ CodeLocationLabel<JSInternalPtrTag> m_slowPathCallLocation;
+ CodeLocationLabel<JSInternalPtrTag> m_slowPathStartLocation;
bool m_generateFastPathOnRepatch { false };
GeneratorType m_generator;
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes