Commit 7946566d authored by Alberto Garcia's avatar Alberto Garcia
Browse files

New upstream version 2.22.5

parent d89422a1
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">JavaScriptCore GLib Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for JavaScriptCore 2.22.4</p></div>
<div><p class="releaseinfo">for JavaScriptCore 2.22.5</p></div>
</div>
<hr>
</div>
......
......@@ -175,7 +175,7 @@ have included when compiling your code.</p>
<hr>
<div class="refsect2">
<a name="JSC-MICRO-VERSION:CAPS"></a><h3>JSC_MICRO_VERSION</h3>
<pre class="programlisting">#define JSC_MICRO_VERSION (4)
<pre class="programlisting">#define JSC_MICRO_VERSION (5)
</pre>
</div>
</div>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WebKitDeviceInfoPermissionRequest: WebKit2GTK+ Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="WebKit2GTK+ Reference Manual">
<link rel="up" href="ch01.html" title="Class Overview">
<link rel="prev" href="WebKitUserMediaPermissionRequest.html" title="WebKitUserMediaPermissionRequest">
<link rel="next" href="WebKitPolicyDecision.html" title="WebKitPolicyDecision">
<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#WebKitDeviceInfoPermissionRequest.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#WebKitDeviceInfoPermissionRequest.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
<a href="#WebKitDeviceInfoPermissionRequest.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="WebKitUserMediaPermissionRequest.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="WebKitPolicyDecision.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="WebKitDeviceInfoPermissionRequest"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="WebKitDeviceInfoPermissionRequest.top_of_page"></a>WebKitDeviceInfoPermissionRequest</span></h2>
<p>WebKitDeviceInfoPermissionRequest — A permission request for accessing user's audio/video devices.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="WebKitDeviceInfoPermissionRequest.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="WebKitDeviceInfoPermissionRequest.html#WebKitDeviceInfoPermissionRequest-struct" title="struct WebKitDeviceInfoPermissionRequest">WebKitDeviceInfoPermissionRequest</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="WebKitDeviceInfoPermissionRequest.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> WebKitDeviceInfoPermissionRequest
</pre>
</div>
<div class="refsect1">
<a name="WebKitDeviceInfoPermissionRequest.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
WebKitDeviceInfoPermissionRequest implements
<a class="link" href="WebKitPermissionRequest.html" title="WebKitPermissionRequest">WebKitPermissionRequest</a>.</p>
</div>
<div class="refsect1">
<a name="WebKitDeviceInfoPermissionRequest.description"></a><h2>Description</h2>
<p>WebKitUserMediaPermissionRequest represents a request for
permission to whether WebKit should be allowed to access the user's
devices information when requested through the enumeraceDevices API.</p>
<p>When a WebKitDeviceInfoPermissionRequest is not handled by the user,
it is denied by default.</p>
</div>
<div class="refsect1">
<a name="WebKitDeviceInfoPermissionRequest.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="WebKitDeviceInfoPermissionRequest.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="WebKitDeviceInfoPermissionRequest-struct"></a><h3>struct WebKitDeviceInfoPermissionRequest</h3>
<pre class="programlisting">struct WebKitDeviceInfoPermissionRequest;</pre>
</div>
</div>
<div class="refsect1">
<a name="WebKitDeviceInfoPermissionRequest.see-also"></a><h2>See Also</h2>
<p><a class="link" href="WebKitPermissionRequest.html" title="WebKitPermissionRequest"><span class="type">WebKitPermissionRequest</span></a>, <a class="link" href="WebKitWebView.html" title="WebKitWebView"><span class="type">WebKitWebView</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29</div>
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKit2GTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.22.4</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.22.5</p></div>
</div>
<hr>
</div>
......
......@@ -213,7 +213,7 @@ against at application run time.</p>
<hr>
<div class="refsect2">
<a name="WEBKIT-MICRO-VERSION:CAPS"></a><h3>WEBKIT_MICRO_VERSION</h3>
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (4)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (5)
</pre>
<p>Like <a class="link" href="webkit2gtk-4.0-WebKitVersion.html#webkit-get-micro-version" title="webkit_get_micro_version ()"><code class="function">webkit_get_micro_version()</code></a>, but from the headers used at
application compile time, rather than from the library linked
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitDOMGTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.22.4</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.22.5</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.22.5
=================
What's new in WebKitGTK+ 2.22.5?
- Improved the logic to determine for which architectures to enable
the JIT compiler support and USE_SYSTEM_MALLOC at build time.
- Fix the build with ENABLE_VIDEO=OFF and ENABLE_OPENGL=OFF.
- Fix several crashes.
=================
WebKitGTK+ 2.22.4
=================
......
/*
* Copyright (C) 2016 Apple Inc. All rights reserved.
* Copyright (C) 2016-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
......@@ -67,6 +67,9 @@ function hasObservableSideEffectsForRegExpMatch(regexp)
{
"use strict";
if (!@isRegExpObject(regexp))
return true;
// This is accessed by the RegExpExec internal function.
let regexpExec = @tryGetById(regexp, "exec");
if (regexpExec !== @regExpBuiltinExec)
......@@ -79,7 +82,7 @@ function hasObservableSideEffectsForRegExpMatch(regexp)
if (regexpUnicode !== @regExpProtoUnicodeGetter)
return true;
return !@isRegExpObject(regexp);
return typeof regexp.lastIndex !== "number";
}
@globalPrivate
......@@ -315,7 +318,9 @@ function search(strArg)
let regexp = this;
// Check for observable side effects and call the fast path if there aren't any.
if (@isRegExpObject(regexp) && @tryGetById(regexp, "exec") === @regExpBuiltinExec)
if (@isRegExpObject(regexp)
&& @tryGetById(regexp, "exec") === @regExpBuiltinExec
&& typeof regexp.lastIndex === "number")
return @regExpSearchFast.@call(regexp, strArg);
// 1. Let rx be the this value.
......@@ -358,6 +363,9 @@ function hasObservableSideEffectsForRegExpSplit(regexp)
{
"use strict";
if (!@isRegExpObject(regexp))
return true;
// This is accessed by the RegExpExec internal function.
let regexpExec = @tryGetById(regexp, "exec");
if (regexpExec !== @regExpBuiltinExec)
......@@ -389,8 +397,8 @@ function hasObservableSideEffectsForRegExpSplit(regexp)
let regexpSource = @tryGetById(regexp, "source");
if (regexpSource !== @regExpProtoSourceGetter)
return true;
return !@isRegExpObject(regexp);
return typeof regexp.lastIndex !== "number";
}
// ES 21.2.5.11 RegExp.prototype[@@split](string, limit)
......@@ -536,7 +544,9 @@ function test(strArg)
let regexp = this;
// Check for observable side effects and call the fast path if there aren't any.
if (@isRegExpObject(regexp) && @tryGetById(regexp, "exec") === @regExpBuiltinExec)
if (@isRegExpObject(regexp)
&& @tryGetById(regexp, "exec") === @regExpBuiltinExec
&& typeof regexp.lastIndex === "number")
return @regExpTestFast.@call(regexp, strArg);
// 1. Let R be the this value.
......
/*
* Copyright (C) 2015 Andy VanWagoner <andy@vanwagoner.family>.
* Copyright (C) 2016 Yusuke Suzuki <utatane.tea@gmail.com>
* Copyright (C) 2016 Apple Inc. All rights reserved.
* Copyright (C) 2016-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
......@@ -195,6 +195,9 @@ function hasObservableSideEffectsForStringReplace(regexp, replacer)
{
"use strict";
if (!@isRegExpObject(regexp))
return true;
if (replacer !== @regExpPrototypeSymbolReplace)
return true;
......@@ -210,7 +213,7 @@ function hasObservableSideEffectsForStringReplace(regexp, replacer)
if (regexpUnicode !== @regExpProtoUnicodeGetter)
return true;
return !@isRegExpObject(regexp);
return typeof regexp.lastIndex !== "number";
}
@intrinsic=StringPrototypeReplaceIntrinsic
......
/*
* Copyright (C) 2012, 2015 Apple Inc. All rights reserved.
* Copyright (C) 2012-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
......@@ -226,37 +226,37 @@ inline JITArrayMode jitArrayModeForStructure(Structure* structure)
struct ByValInfo {
ByValInfo() { }
ByValInfo(unsigned bytecodeIndex, CodeLocationJump<JSInternalPtrTag> notIndexJump, CodeLocationJump<JSInternalPtrTag> badTypeJump, CodeLocationLabel<ExceptionHandlerPtrTag> exceptionHandler, JITArrayMode arrayMode, ArrayProfile* arrayProfile, int16_t badTypeJumpToDone, int16_t badTypeJumpToNextHotPath, int16_t returnAddressToSlowPath)
: bytecodeIndex(bytecodeIndex)
, notIndexJump(notIndexJump)
ByValInfo(unsigned bytecodeIndex, CodeLocationJump<JSInternalPtrTag> notIndexJump, CodeLocationJump<JSInternalPtrTag> badTypeJump, CodeLocationLabel<ExceptionHandlerPtrTag> exceptionHandler, JITArrayMode arrayMode, ArrayProfile* arrayProfile, CodeLocationLabel<JSInternalPtrTag> badTypeDoneTarget, CodeLocationLabel<JSInternalPtrTag> badTypeNextHotPathTarget, CodeLocationLabel<JSInternalPtrTag> slowPathTarget)
: notIndexJump(notIndexJump)
, badTypeJump(badTypeJump)
, exceptionHandler(exceptionHandler)
, arrayMode(arrayMode)
, badTypeDoneTarget(badTypeDoneTarget)
, badTypeNextHotPathTarget(badTypeNextHotPathTarget)
, slowPathTarget(slowPathTarget)
, arrayProfile(arrayProfile)
, badTypeJumpToDone(badTypeJumpToDone)
, badTypeJumpToNextHotPath(badTypeJumpToNextHotPath)
, returnAddressToSlowPath(returnAddressToSlowPath)
, bytecodeIndex(bytecodeIndex)
, slowPathCount(0)
, stubInfo(nullptr)
, arrayMode(arrayMode)
, tookSlowPath(false)
, seen(false)
{
}
unsigned bytecodeIndex;
CodeLocationJump<JSInternalPtrTag> notIndexJump;
CodeLocationJump<JSInternalPtrTag> badTypeJump;
CodeLocationLabel<ExceptionHandlerPtrTag> exceptionHandler;
JITArrayMode arrayMode; // The array mode that was baked into the inline JIT code.
CodeLocationLabel<JSInternalPtrTag> badTypeDoneTarget;
CodeLocationLabel<JSInternalPtrTag> badTypeNextHotPathTarget;
CodeLocationLabel<JSInternalPtrTag> slowPathTarget;
ArrayProfile* arrayProfile;
int16_t badTypeJumpToDone;
int16_t badTypeJumpToNextHotPath;
int16_t returnAddressToSlowPath;
unsigned bytecodeIndex;
unsigned slowPathCount;
RefPtr<JITStubRoutine> stubRoutine;
Identifier cachedId;
WriteBarrier<Symbol> cachedSymbol;
StructureStubInfo* stubInfo;
JITArrayMode arrayMode; // The array mode that was baked into the inline JIT code.
bool tookSlowPath : 1;
bool seen : 1;
};
......
......@@ -142,9 +142,9 @@ void InlineAccess::dumpCacheSizesAndCrash()
template <typename Function>
ALWAYS_INLINE static bool linkCodeInline(const char* name, CCallHelpers& jit, StructureStubInfo& stubInfo, const Function& function)
{
if (jit.m_assembler.buffer().codeSize() <= stubInfo.patch.inlineSize) {
if (jit.m_assembler.buffer().codeSize() <= stubInfo.patch.inlineSize()) {
bool needsBranchCompaction = false;
LinkBuffer linkBuffer(jit, stubInfo.patch.start, stubInfo.patch.inlineSize, JITCompilationMustSucceed, needsBranchCompaction);
LinkBuffer linkBuffer(jit, stubInfo.patch.start, stubInfo.patch.inlineSize(), JITCompilationMustSucceed, needsBranchCompaction);
ASSERT(linkBuffer.isValid());
function(linkBuffer);
FINALIZE_CODE(linkBuffer, NoPtrTag, "InlineAccessType: '%s'", name);
......@@ -159,7 +159,7 @@ ALWAYS_INLINE static bool linkCodeInline(const char* name, CCallHelpers& jit, St
const bool failIfCantInline = false;
if (failIfCantInline) {
dataLog("Failure for: ", name, "\n");
dataLog("real size: ", jit.m_assembler.buffer().codeSize(), " inline size:", stubInfo.patch.inlineSize, "\n");
dataLog("real size: ", jit.m_assembler.buffer().codeSize(), " inline size:", stubInfo.patch.inlineSize(), "\n");
CRASH();
}
......
......@@ -186,10 +186,18 @@ public:
struct {
CodeLocationLabel<JITStubRoutinePtrTag> start; // This is either the start of the inline IC for *byId caches. or the location of patchable jump for 'instanceof' caches.
CodeLocationLabel<JSInternalPtrTag> doneLocation;
CodeLocationCall<JSInternalPtrTag> slowPathCallLocation;
CodeLocationLabel<JITStubRoutinePtrTag> slowPathStartLocation;
RegisterSet usedRegisters;
uint32_t inlineSize;
int32_t deltaFromStartToSlowPathCallLocation;
int32_t deltaFromStartToSlowPathStart;
uint32_t inlineSize() const
{
int32_t inlineSize = MacroAssembler::differenceBetweenCodePtr(start, doneLocation);
ASSERT(inlineSize >= 0);
return inlineSize;
}
GPRReg baseGPR;
GPRReg valueGPR;
......@@ -206,9 +214,10 @@ public:
return patch.baseGPR;
}
CodeLocationCall<JSInternalPtrTag> slowPathCallLocation() { return patch.start.callAtOffset<JSInternalPtrTag>(patch.deltaFromStartToSlowPathCallLocation); }
CodeLocationLabel<JSInternalPtrTag> doneLocation() { return patch.start.labelAtOffset<JSInternalPtrTag>(patch.inlineSize); }
CodeLocationLabel<JITStubRoutinePtrTag> slowPathStartLocation() { return patch.start.labelAtOffset(patch.deltaFromStartToSlowPathStart); }
CodeLocationCall<JSInternalPtrTag> slowPathCallLocation() { return patch.slowPathCallLocation; }
CodeLocationLabel<JSInternalPtrTag> doneLocation() { return patch.doneLocation; }
CodeLocationLabel<JITStubRoutinePtrTag> slowPathStartLocation() { return patch.slowPathStartLocation; }
CodeLocationJump<JSInternalPtrTag> patchableJump()
{
ASSERT(accessType == AccessType::InstanceOf);
......
......@@ -182,15 +182,7 @@ namespace JSC {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(ForInContext);
public:
ForInContext(RegisterID* localRegister)
: m_localRegister(localRegister)
, m_isValid(true)
{
}
virtual ~ForInContext()
{
}
virtual ~ForInContext() = default;
bool isValid() const { return m_isValid; }
void invalidate() { m_isValid = false; }
......@@ -209,7 +201,7 @@ namespace JSC {
ASSERT(isIndexedForInContext());
return *reinterpret_cast<IndexedForInContext*>(this);
}
StructureForInContext& asStructureForInContext()
{
ASSERT(isStructureForInContext());
......
/*
* 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 @@ public:
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();
}
......
......@@ -102,10 +102,8 @@ void JITCompiler::linkOSRExits()
addLinkTask([target, osrExitThunkLabel] (LinkBuffer& linkBuffer) {
linkBuffer.link(target, osrExitThunkLabel);
});
} else {
OSRExit& exit = m_jitCode->osrExit[i];
exit.setPatchableCodeOffset(patchableJump());
}
} else
info.m_patchableJump = patchableJump();
}
}
......@@ -300,9 +298,9 @@ void JITCompiler::link(LinkBuffer& linkBuffer)
for (unsigned i = 0; i < m_jitCode->osrExit.size(); ++i) {
OSRExitCompilationInfo& info = m_exitCompilationInfo[i];
if (!Options::useProbeOSRExit()) {
linkBuffer.link(info.m_patchableJump.m_jump, target);
OSRExit& exit = m_jitCode->osrExit[i];
linkBuffer.link(exit.getPatchableCodeOffsetAsJump(), target);
exit.correctJump(linkBuffer);
exit.m_patchableJumpLocation = linkBuffer.locationOf<JSInternalPtrTag>(info.m_patchableJump);
}
if (info.m_replacementSource.isSet()) {
m_jitCode->common.jumpReplacements.append(JumpReplacement(
......@@ -576,7 +574,7 @@ void JITCompiler::noticeOSREntry(BasicBlock& basicBlock, JITCompiler::Label bloc
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;
......
......@@ -42,7 +42,7 @@ namespace JSC { namespace DFG {
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 @@ void* prepareOSREntry(ExecState* exec, CodeBlock* codeBlock, unsigned bytecodeIn
*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;
......
......@@ -54,7 +54,7 @@ struct OSREntryReshuffling {
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;
......
......@@ -921,26 +921,9 @@ OSRExit::OSRExit(ExitKind kind, JSValueSource jsValueSource, MethodOfGettingAVal
DFG_ASSERT(jit->m_jit.graph(), jit->m_currentNode, canExit);
}
void OSRExit::setPatchableCodeOffset(MacroAssembler::PatchableJump check)
CodeLocationJump<JSInternalPtrTag> OSRExit::codeLocationForRepatch() const
{
m_patchableCodeOffset = check.m_jump.m_label.m_offset;
}
MacroAssembler::Jump OSRExit::getPatchableCodeOffsetAsJump() const
{
return MacroAssembler::Jump(AssemblerLabel(m_patchableCodeOffset));
}
CodeLocationJump<JSInternalPtrTag> OSRExit::codeLocationForRepatch(CodeBlock* dfgCodeBlock) const
{
return CodeLocationJump<JSInternalPtrTag>(tagCodePtr<JSInternalPtrTag>(dfgCodeBlock->jitCode()->dataAddressAtOffset(m_patchableCodeOffset)));
}
void OSRExit::correctJump(LinkBuffer& linkBuffer)
{
MacroAssembler::Label label;
label.m_label.m_offset = m_patchableCodeOffset;
m_patchableCodeOffset = linkBuffer.offsetOf(label);
return CodeLocationJump<JSInternalPtrTag>(m_patchableJumpLocation);
}
void OSRExit::emitRestoreArguments(CCallHelpers& jit, const Operands<ValueRecovery>& operands)
......@@ -1082,7 +1065,7 @@ void JIT_OPERATION OSRExit::compileOSRExit(ExecState* exec)
toCString(ignoringContext<DumpContext>(operands)).data());
}
MacroAssembler::repatchJump(exit.codeLocationForRepatch(codeBlock), CodeLocationLabel<OSRExitPtrTag>(exit.m_code.code()));
MacroAssembler::repatchJump(exit.codeLocationForRepatch(), CodeLocationLabel<OSRExitPtrTag>(exit.m_code.code()));
vm->osrExitJumpDestination = exit.m_code.code().executableAddress();
}
......
......@@ -145,8 +145,7 @@ struct OSRExit : public OSRExitBase {
static void JIT_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL;
static void executeOSRExit(Probe::Context&);
// FIXME: <rdar://problem/39498244>.
unsigned m_patchableCodeOffset { 0 };
CodeLocationLabel<JSInternalPtrTag> m_patchableJumpLocation;
MacroAssemblerCodeRef<OSRExitPtrTag> m_code;
RefPtr<OSRExitState> exitState;
......@@ -156,10 +155,7 @@ struct OSRExit : public OSRExitBase {
unsigned m_recoveryIndex;
void setPatchableCodeOffset(MacroAssembler::PatchableJump);
MacroAssembler::Jump getPatchableCodeOffsetAsJump() const;
CodeLocationJump<JSInternalPtrTag> codeLocationForRepatch(CodeBlock*) const;
void correctJump(LinkBuffer&);
CodeLocationJump<JSInternalPtrTag> codeLocationForRepatch() const;
unsigned m_streamIndex;
void considerAddingAsFrequentExitSite(CodeBlock* profiledCodeBlock)
......
......@@ -35,6 +35,7 @@ struct OSRExitCompilationInfo {
MacroAssembler::JumpList m_failureJumps;
MacroAssembler::Label m_replacementSource;
MacroAssembler::Label m_replacementDestination;
MacroAssembler::PatchableJump m_patchableJump;
};
} } // namespace JSC::DFG
......
......@@ -853,10 +853,9 @@ CompilationResult JIT::link()
if (Jump(patchableNotIndexJump).isSet())
notIndexJump = CodeLocationJump<JSInternalPtrTag>(patchBuffer.locationOf<JSInternalPtrTag>(patchableNotIndexJump));
auto badTypeJump = CodeLocationJump<JSInternalPtrTag>(patchBuffer.locationOf<JSInternalPtrTag>(byValCompilationInfo.badTypeJump));
CodeLocationLabel<NoPtrTag> doneTarget = patchBuffer.locationOf<NoPtrTag>(byValCompilationInfo.doneTarget);
CodeLocationLabel<NoPtrTag> nextHotPathTarget = patchBuffer.locationOf<NoPtrTag>(byValCompilationInfo.nextHotPathTarget);
CodeLocationLabel<NoPtrTag> slowPathTarget = patchBuffer.locationOf<NoPtrTag>(byValCompilationInfo.slowPathTarget);
CodeLocationCall<NoPtrTag> returnAddress = patchBuffer.locationOf<NoPtrTag>(byValCompilationInfo.returnAddress);
auto doneTarget = CodeLocationLabel<JSInternalPtrTag>(patchBuffer.locationOf<JSInternalPtrTag>(byValCompilationInfo.doneTarget));