<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[184468] releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/184468">184468</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-05-18 06:38:54 -0700 (Mon, 18 May 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GTK][Stable] Missing implementation of callToJavaScript/callToNativeFunction with msys/mingw32
https://bugs.webkit.org/show_bug.cgi?id=132856
Patch by Milan Crha <mcrha@redhat.com> on 2015-04-17
* jit/JITStubsX86.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit24SourceJavaScriptCoreChangeLog">releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit24SourceJavaScriptCorejitJITStubsX86h">releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/jit/JITStubsX86.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit24SourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/ChangeLog (184467 => 184468)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/ChangeLog        2015-05-18 13:09:48 UTC (rev 184467)
+++ releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/ChangeLog        2015-05-18 13:38:54 UTC (rev 184468)
</span><span class="lines">@@ -1,3 +1,10 @@
</span><ins>+2015-04-17 Milan Crha <mcrha@redhat.com>
+
+ [GTK][Stable] Missing implementation of callToJavaScript/callToNativeFunction with msys/mingw32
+ https://bugs.webkit.org/show_bug.cgi?id=132856
+
+ * jit/JITStubsX86.h:
+
</ins><span class="cx"> 2015-01-06 Philip Chimento <philip.chimento@gmail.com>
</span><span class="cx">
</span><span class="cx"> webkit-gtk 2.3.3 fails to build on OS X - Conflicting type "Fixed"
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit24SourceJavaScriptCorejitJITStubsX86h"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/jit/JITStubsX86.h (184467 => 184468)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/jit/JITStubsX86.h        2015-05-18 13:09:48 UTC (rev 184467)
+++ releases/WebKitGTK/webkit-2.4/Source/JavaScriptCore/jit/JITStubsX86.h        2015-05-18 13:38:54 UTC (rev 184468)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #define JITStubsX86_h
</span><span class="cx">
</span><span class="cx"> #include "JITStubsX86Common.h"
</span><ins>+#include <wtf/InlineASM.h>
</ins><span class="cx">
</span><span class="cx"> #if !CPU(X86)
</span><span class="cx"> #error "JITStubsX86.h should only be #included if CPU(X86)"
</span><span class="lines">@@ -198,6 +199,225 @@
</span><span class="cx"> );
</span><span class="cx"> #endif // USE(MASM_PROBE)
</span><span class="cx">
</span><ins>+#if OS(WINDOWS)
+extern "C" {
+
+ // FIXME: Since Windows doesn't use the LLInt, we have inline stubs here.
+ // Until the LLInt is changed to support Windows, these stub needs to be updated.
+ asm (
+ ".globl " SYMBOL_STRING(callToJavaScript) "\n"
+ HIDE_SYMBOL(callToJavaScript) "\n"
+ SYMBOL_STRING(callToJavaScript) ":" "\n"
+ "mov (%esp),%edx" "\n"
+ "push %ebp" "\n"
+ "mov %ebp,%eax" "\n"
+ "mov %esp,%ebp" "\n"
+ "push %esi" "\n"
+ "push %edi" "\n"
+ "push %ebx" "\n"
+ "sub $0x1c,%esp" "\n"
+ "mov 0x34(%esp),%ecx" "\n"
+ "mov 0x38(%esp),%esi" "\n"
+ "mov 0x3c(%esp),%ebp" "\n"
+ "sub $0x20,%ebp" "\n"
+ "movl $0x0,0x24(%ebp)" "\n"
+ "movl $0x0,0x20(%ebp)" "\n"
+ "movl $0x0,0x1c(%ebp)" "\n"
+ "mov %ecx,0x18(%ebp)" "\n"
+ "mov (%ecx),%ebx" "\n"
+ "movl $0x0,0x14(%ebp)" "\n"
+ "mov %ebx,0x10(%ebp)" "\n"
+ "movl $0x0,0xc(%ebp)" "\n"
+ "movl $0x1,0x8(%ebp)" "\n"
+ "mov %edx,0x4(%ebp)" "\n"
+ "mov %eax,0x0(%ebp)" "\n"
+ "mov %ebp,%eax" "\n"
+
+ "mov 0x28(%esi),%edx" "\n"
+ "add $0x5,%edx" "\n"
+ "shl $0x3,%edx" "\n"
+ "sub %edx,%ebp" "\n"
+ "mov %eax,0x0(%ebp)" "\n"
+
+ "mov $0x5,%eax" "\n"
+
+ ".copyHeaderLoop:" "\n"
+ "sub $0x1,%eax" "\n"
+ "mov (%esi,%eax,8),%ecx" "\n"
+ "mov %ecx,0x8(%ebp,%eax,8)" "\n"
+ "mov 0x4(%esi,%eax,8),%ecx" "\n"
+ "mov %ecx,0xc(%ebp,%eax,8)" "\n"
+ "test %eax,%eax" "\n"
+ "jne .copyHeaderLoop" "\n"
+
+ "mov 0x18(%esi),%edx" "\n"
+ "sub $0x1,%edx" "\n"
+ "mov 0x28(%esi),%ecx" "\n"
+ "sub $0x1,%ecx" "\n"
+
+ "cmp %ecx,%edx" "\n"
+ "je .copyArgs" "\n"
+
+ "xor %eax,%eax" "\n"
+ "mov $0xfffffffc,%ebx" "\n"
+
+ ".fillExtraArgsLoop:" "\n"
+ "sub $0x1,%ecx" "\n"
+ "mov %eax,0x30(%ebp,%ecx,8)" "\n"
+ "mov %ebx,0x34(%ebp,%ecx,8)" "\n"
+ "cmp %ecx,%edx" "\n"
+ "jne .fillExtraArgsLoop" "\n"
+
+ ".copyArgs:" "\n"
+ "mov 0x2c(%esi),%eax" "\n"
+
+ ".copyArgsLoop:" "\n"
+ "test %edx,%edx" "\n"
+ "je .copyArgsDone" "\n"
+ "sub $0x1,%edx" "\n"
+ "mov (%eax,%edx,8),%ecx" "\n"
+ "mov 0x4(%eax,%edx,8),%ebx" "\n"
+ "mov %ecx,0x30(%ebp,%edx,8)" "\n"
+ "mov %ebx,0x34(%ebp,%edx,8)" "\n"
+ "jmp .copyArgsLoop" "\n"
+
+ ".copyArgsDone:" "\n"
+ "mov 0x34(%esp),%ecx" "\n"
+ "mov %ebp,(%ecx)" "\n"
+
+ "call *0x30(%esp)" "\n"
+
+ "cmpl $0x1,0x8(%ebp)" "\n"
+ "je .calleeFramePopped" "\n"
+ "mov 0x0(%ebp),%ebp" "\n"
+
+ ".calleeFramePopped:" "\n"
+ "mov 0x18(%ebp),%ecx" "\n"
+ "mov 0x10(%ebp),%ebx" "\n"
+ "mov %ebx,(%ecx)" "\n"
+
+ "add $0x1c,%esp" "\n"
+ "pop %ebx" "\n"
+ "pop %edi" "\n"
+ "pop %esi" "\n"
+ "pop %ebp" "\n"
+ "ret" "\n"
+
+ ".globl " SYMBOL_STRING(returnFromJavaScript) "\n"
+ HIDE_SYMBOL(returnFromJavaScript) "\n"
+ SYMBOL_STRING(returnFromJavaScript) ":" "\n"
+ "add $0x1c,%esp" "\n"
+ "pop %ebx" "\n"
+ "pop %edi" "\n"
+ "pop %esi" "\n"
+ "pop %ebp" "\n"
+ "ret" "\n"
+
+ ".globl " SYMBOL_STRING(callToNativeFunction) "\n"
+ HIDE_SYMBOL(callToNativeFunction) "\n"
+ SYMBOL_STRING(callToNativeFunction) ":" "\n"
+ "mov (%esp),%edx" "\n"
+ "push %ebp" "\n"
+ "mov %ebp,%eax" "\n"
+ "mov %esp,%ebp" "\n"
+ "push %esi" "\n"
+ "push %edi" "\n"
+ "push %ebx" "\n"
+ "sub $0x1c,%esp" "\n"
+ "mov 0x34(%esp),%ecx" "\n"
+ "mov 0x38(%esp),%esi" "\n"
+ "mov 0x3c(%esp),%ebp" "\n"
+ "sub $0x20,%ebp" "\n"
+ "movl $0x0,0x24(%ebp)" "\n"
+ "movl $0x0,0x20(%ebp)" "\n"
+ "movl $0x0,0x1c(%ebp)" "\n"
+ "mov %ecx,0x18(%ebp)" "\n"
+ "mov (%ecx),%ebx" "\n"
+ "movl $0x0,0x14(%ebp)" "\n"
+ "mov %ebx,0x10(%ebp)" "\n"
+ "movl $0x0,0xc(%ebp)" "\n"
+ "movl $0x1,0x8(%ebp)" "\n"
+ "mov %edx,0x4(%ebp)" "\n"
+ "mov %eax,0x0(%ebp)" "\n"
+ "mov %ebp,%eax" "\n"
+
+ "mov 0x28(%esi),%edx" "\n"
+ "add $0x5,%edx" "\n"
+ "shl $0x3,%edx" "\n"
+ "sub %edx,%ebp" "\n"
+ "mov %eax,0x0(%ebp)" "\n"
+
+ "mov $0x5,%eax" "\n"
+
+ "copyHeaderLoop:" "\n"
+ "sub $0x1,%eax" "\n"
+ "mov (%esi,%eax,8),%ecx" "\n"
+ "mov %ecx,0x8(%ebp,%eax,8)" "\n"
+ "mov 0x4(%esi,%eax,8),%ecx" "\n"
+ "mov %ecx,0xc(%ebp,%eax,8)" "\n"
+ "test %eax,%eax" "\n"
+ "jne copyHeaderLoop" "\n"
+
+ "mov 0x18(%esi),%edx" "\n"
+ "sub $0x1,%edx" "\n"
+ "mov 0x28(%esi),%ecx" "\n"
+ "sub $0x1,%ecx" "\n"
+
+ "cmp %ecx,%edx" "\n"
+ "je copyArgs" "\n"
+
+ "xor %eax,%eax" "\n"
+ "mov $0xfffffffc,%ebx" "\n"
+
+ "fillExtraArgsLoop:" "\n"
+ "sub $0x1,%ecx" "\n"
+ "mov %eax,0x30(%ebp,%ecx,8)" "\n"
+ "mov %ebx,0x34(%ebp,%ecx,8)" "\n"
+ "cmp %ecx,%edx" "\n"
+ "jne fillExtraArgsLoop" "\n"
+
+ "copyArgs:" "\n"
+ "mov 0x2c(%esi),%eax" "\n"
+
+ "copyArgsLoop:" "\n"
+ "test %edx,%edx" "\n"
+ "je copyArgsDone" "\n"
+ "sub $0x1,%edx" "\n"
+ "mov (%eax,%edx,8),%ecx" "\n"
+ "mov 0x4(%eax,%edx,8),%ebx" "\n"
+ "mov %ecx,0x30(%ebp,%edx,8)" "\n"
+ "mov %ebx,0x34(%ebp,%edx,8)" "\n"
+ "jmp copyArgsLoop" "\n"
+
+ "copyArgsDone:" "\n"
+ "mov 0x34(%esp),%ecx" "\n"
+ "mov %ebp,(%ecx)" "\n"
+
+ "mov 0x30(%esp),%edi" "\n"
+ "mov %ebp,0x30(%esp)" "\n"
+ "mov %ebp,%ecx" "\n"
+ "call *%edi" "\n"
+
+ "cmpl $0x1,0x8(%ebp)" "\n"
+ "je calleeFramePopped" "\n"
+ "mov 0x0(%ebp),%ebp" "\n"
+
+ "calleeFramePopped:" "\n"
+ "mov 0x18(%ebp),%ecx" "\n"
+ "mov 0x10(%ebp),%ebx" "\n"
+ "mov %ebx,(%ecx)" "\n"
+
+ "add $0x1c,%esp" "\n"
+ "pop %ebx" "\n"
+ "pop %edi" "\n"
+ "pop %esi" "\n"
+ "pop %ebp" "\n"
+ "ret" "\n"
+ );
+}
+
+#endif // OS(WINDOWS)
+
</ins><span class="cx"> #endif // COMPILER(GCC)
</span><span class="cx">
</span><span class="cx"> #if COMPILER(MSVC)
</span></span></pre>
</div>
</div>
</body>
</html>