<!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>[162577] branches/jsCStack/Source</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/162577">162577</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2014-01-22 18:02:37 -0800 (Wed, 22 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Switching Windows port to using the C Loop LLINT.
https://bugs.webkit.org/show_bug.cgi?id=127228.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

With the switch to using the C stack for the JS stack, the LLINT becomes
a mandatory component for providing trampoline glue code to enter JIT code.
Since the Windows port does not currently have a LLINT implementation that
can generate assembly code for Windows, we'll switch the Windows port to
using the C Loop LLINT.

Note: We're opting to not continue using hand-written glue code for the
Windows port because they can easily bit rot relative to the LLINT asm
source.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* jit/JITStubsMSVC64.asm: Removed.
* jit/JITStubsX86.h:
- Removing these hand-written pieces of glue code that are no longer
  needed with the switch to using the C Loop LLINT.

Source/WTF: 

* wtf/Platform.h:
- Disabling the JIT for all Windows ports, which enables the C Loop LLINT.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchesjsCStackSourceJavaScriptCoreChangeLog">branches/jsCStack/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCorejitJITStubsMSVC64asm">branches/jsCStack/Source/JavaScriptCore/jit/JITStubsMSVC64.asm</a></li>
<li><a href="#branchesjsCStackSourceJavaScriptCorejitJITStubsX86h">branches/jsCStack/Source/JavaScriptCore/jit/JITStubsX86.h</a></li>
<li><a href="#branchesjsCStackSourceWTFChangeLog">branches/jsCStack/Source/WTF/ChangeLog</a></li>
<li><a href="#branchesjsCStackSourceWTFwtfPlatformh">branches/jsCStack/Source/WTF/wtf/Platform.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchesjsCStackSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/ChangeLog (162576 => 162577)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/ChangeLog        2014-01-23 02:01:39 UTC (rev 162576)
+++ branches/jsCStack/Source/JavaScriptCore/ChangeLog        2014-01-23 02:02:37 UTC (rev 162577)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2014-01-22  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Switching Windows port to using the C Loop LLINT.
+        https://bugs.webkit.org/show_bug.cgi?id=127228.
+
+        Reviewed by Geoffrey Garen.
+
+        With the switch to using the C stack for the JS stack, the LLINT becomes
+        a mandatory component for providing trampoline glue code to enter JIT code.
+        Since the Windows port does not currently have a LLINT implementation that
+        can generate assembly code for Windows, we'll switch the Windows port to
+        using the C Loop LLINT.
+
+        Note: We're opting to not continue using hand-written glue code for the
+        Windows port because they can easily bit rot relative to the LLINT asm
+        source.
+
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+        * jit/JITStubsMSVC64.asm: Removed.
+        * jit/JITStubsX86.h:
+        - Removing these hand-written pieces of glue code that are no longer
+          needed with the switch to using the C Loop LLINT.
+
</ins><span class="cx"> 2014-01-21  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         FTL should support CheckArgumentsNotCreated
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (162576 => 162577)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-01-23 02:01:39 UTC (rev 162576)
+++ branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-01-23 02:02:37 UTC (rev 162577)
</span><span class="lines">@@ -1336,18 +1336,6 @@
</span><span class="cx">       &lt;FileType&gt;Document&lt;/FileType&gt;
</span><span class="cx">     &lt;/None&gt;
</span><span class="cx">   &lt;/ItemGroup&gt;
</span><del>-  &lt;ItemGroup&gt;
-    &lt;MASM Include=&quot;..\jit\JITStubsMSVC64.asm&quot;&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Release|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Production|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='Debug|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-      &lt;ExcludedFromBuild Condition=&quot;'$(Configuration)|$(Platform)'=='DebugSuffix|x64'&quot;&gt;true&lt;/ExcludedFromBuild&gt;
-    &lt;/MASM&gt;
-  &lt;/ItemGroup&gt;
</del><span class="cx">   &lt;Import Project=&quot;$(VCTargetsPath)\Microsoft.Cpp.targets&quot; /&gt;
</span><span class="cx">   &lt;ImportGroup Label=&quot;ExtensionTargets&quot;&gt;
</span><span class="cx">     &lt;Import Project=&quot;$(VCTargetsPath)\BuildCustomizations\masm.targets&quot; /&gt;
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (162576 => 162577)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-01-23 02:01:39 UTC (rev 162576)
+++ branches/jsCStack/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-01-23 02:02:37 UTC (rev 162577)
</span><span class="lines">@@ -3174,9 +3174,4 @@
</span><span class="cx">     &lt;None Include=&quot;JavaScriptCorePostBuild.cmd&quot; /&gt;
</span><span class="cx">     &lt;None Include=&quot;JavaScriptCorePreBuild.cmd&quot; /&gt;
</span><span class="cx">   &lt;/ItemGroup&gt;
</span><del>-  &lt;ItemGroup&gt;
-    &lt;MASM Include=&quot;..\jit\JITStubsMSVC64.asm&quot;&gt;
-      &lt;Filter&gt;jit&lt;/Filter&gt;
-    &lt;/MASM&gt;
-  &lt;/ItemGroup&gt;
</del><span class="cx"> &lt;/Project&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCorejitJITStubsMSVC64asm"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/jit/JITStubsMSVC64.asm (162576 => 162577)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/jit/JITStubsMSVC64.asm        2014-01-23 02:01:39 UTC (rev 162576)
+++ branches/jsCStack/Source/JavaScriptCore/jit/JITStubsMSVC64.asm        2014-01-23 02:02:37 UTC (rev 162577)
</span><span class="lines">@@ -1,269 +0,0 @@
</span><del>-;/*
-; Copyright (C) 2013 Digia Plc. and/or its subsidiary(-ies)
-;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions
-; are met:
-; 1. Redistributions of source code must retain the above copyright
-;    notice, this list of conditions and the following disclaimer.
-; 2. Redistributions in binary form must reproduce the above copyright
-;    notice, this list of conditions and the following disclaimer in the
-;    documentation and/or other materials provided with the distribution.
-;
-; THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-; PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-; OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;*/
-
-EXTERN getHostCallReturnValueWithExecState : near
-
-PUBLIC callToJavaScript
-PUBLIC handleUncaughtException
-PUBLIC getHostCallReturnValue
-
-_TEXT   SEGMENT
-
-callToJavaScript PROC
-    ;; FIXME: This function has not been tested as the Win 64 port doesn't currently use the JIT.
-    ;; It is believed to be an accurate adaptation of the assembly created by the llint stub of the
-    ;; same name with changes for agrument register differences.
-
-    ;; FIXME: This code is stale and need to be updated for the following:
-    ;; 1. The prototype is now:
-    ;;        EncodedJSValue callToJavaScript(void* code, VM*, ProtoCallFrame*)
-    ;;    The code below was implemented for a prototype of:
-    ;;        EncodedJSValue callToJavaScript(void* code, ExecState**, ProtoCallFrame*, Register*)
-    ;;
-    ;; 2. Need to add code for a stack check to ensure that we have enough stack space
-    ;;    for incoming args.
-
-    int 3
-    mov r10, qword ptr[rsp]
-    push rbp
-    mov rax, rbp ; Save previous frame pointer
-    mov rbp, rsp
-    push r12
-    push r13
-    push r14
-    push r15
-    push rbx
-    push rsi
-    push rdi
-
-    ; JIT operations can use up to 6 args (4 in registers and 2 on the stack).
-    ; In addition, X86_64 ABI specifies that the worse case stack alignment
-    ; requirement is 32 bytes. Based on these factors, we need to pad the stack
-    ; an additional 28h bytes.
-    sub rsp, 28h
-
-    mov rbp, r9
-    sub rbp, 40
-    mov qword ptr[rbp + 40], 0
-    mov qword ptr[rbp + 32], rdx
-
-    mov rax, qword ptr[rdx]
-    mov qword ptr[rbp + 24], rax
-    mov qword ptr[rbp + 16], 1
-    mov qword ptr[rbp + 8], r10
-    mov qword ptr[rbp], rax
-    mov rax, rbp
-
-    mov ebx, dword ptr[r8 + 40]
-    add rbx, 6
-    sal rbx, 3
-    sub rbp, rbx
-    mov qword ptr[rbp], rax
-
-    mov rax, 5
-
-copyHeaderLoop:
-    sub rax, 1
-    mov r10, qword ptr[r8 + rax * 8]
-    mov qword ptr[rbp + rax * 8 + 16], r10
-    test rax, rax
-    jnz copyHeaderLoop
-
-    mov ebx, dword ptr[r8 + 24]
-    sub rbx, 1
-    mov r10d, dword ptr[r8 + 40]
-    sub r10, 1
-    cmp rbx, r10
-    je copyArgs
-    mov rax, 0ah
-
-fillExtraArgsLoop:
-    sub r10, 1
-    mov qword ptr[rbp + r10 * 8 + 56], rax
-    cmp rbx, r10
-    jne fillExtraArgsLoop
-
-copyArgs:
-    mov rax, qword ptr[r8 + 48]
-
-copyArgsLoop:
-    test ebx, ebx
-    jz copyArgsDone
-    sub ebx, 1
-    mov r10, qword ptr[rax + rbx * 8]
-    mov qword ptr[rbp + rbx * 8 + 56], r10
-    jmp copyArgsLoop
-
-copyArgsDone:
-    mov qword ptr[rdx], rbp
-    mov r14, 0FFFF000000000000h
-    mov r15, 0FFFF000000000002h
-    call rcx
-    cmp qword ptr[rbp + 16], 1
-    je calleeFramePopped
-    mov rbp, qword ptr[rbp]
-
-calleeFramePopped:
-    mov rbx, qword ptr[rbp + 32] ; VM.topCallFrame
-    mov r10, qword ptr[rbp + 24]
-    mov qword ptr[rbx], r10
-    add rsp, 28h
-    pop rdi
-    pop rsi
-    pop rbx
-    pop r15
-    pop r14
-    pop r13
-    pop r12
-    pop rbp
-    ret
-callToJavaScript ENDP
-
-callToNativeFunction PROC
-    ;; FIXME: This function has not been tested as the Win 64 port doesn't currently use the JIT.
-    ;; It is believed to be an accurate adaptation of the assembly created by the llint stub of the
-    ;; same name with changes for agrument register differences.
-    int 3
-    mov r10, qword ptr[rsp]
-    push rbp
-    mov rax, rbp ; Save previous frame pointer
-    mov rbp, rsp
-    push r12
-    push r13
-    push r14
-    push r15
-    push rbx
-    push rsi
-    push rdi
-
-    ; JIT operations can use up to 6 args (4 in registers and 2 on the stack).
-    ; In addition, X86_64 ABI specifies that the worse case stack alignment
-    ; requirement is 32 bytes. Based on these factors, we need to pad the stack
-    ; an additional 28h bytes.
-    sub rsp, 28h
-
-    mov rbp, r9
-    sub rbp, 40
-    mov qword ptr[rbp + 40], 0
-    mov qword ptr[rbp + 32], rdx
-
-    mov rax, qword ptr[rdx]
-    mov qword ptr[rbp + 24], rax
-    mov qword ptr[rbp + 16], 1
-    mov qword ptr[rbp + 8], r10
-    mov qword ptr[rbp], rax
-    mov rax, rbp
-
-    mov ebx, dword ptr[r8 + 40]
-    add rbx, 6
-    sal rbx, 3
-    sub rbp, rbx
-    mov qword ptr[rbp], rax
-
-    mov rax, 5
-
-copyHeaderLoop:
-    sub rax, 1
-    mov r10, qword ptr[r8 + rax * 8]
-    mov qword ptr[rbp + rax * 8 + 16], r10
-    test rax, rax
-    jnz copyHeaderLoop
-
-    mov ebx, dword ptr[r8 + 24]
-    sub rbx, 1
-    mov r10d, dword ptr[r8 + 40]
-    sub r10, 1
-    cmp rbx, r10
-    je copyArgs
-    mov rax, 0ah
-
-fillExtraArgsLoop:
-    sub r10, 1
-    mov qword ptr[rbp + r10 * 8 + 56], rax
-    cmp rbx, r10
-    jne fillExtraArgsLoop
-
-copyArgs:
-    mov rax, qword ptr[r8 + 48]
-
-copyArgsLoop:
-    test rbx, rbx
-    jz copyArgsDone
-    sub rbx, 1
-    mov r10, qword ptr[rax + rbx * 8]
-    mov qword ptr[rbp + rbx * 8 + 56], r10
-    jmp copyArgsLoop
-
-copyArgsDone:
-    mov qword ptr[rdx], rbp
-    mov r14, 0FFFF000000000000h
-    mov r15, 0FFFF000000000002h
-
-    mov rax, rcx
-    mov rcx, rbp
-    call rax
-
-    cmp qword ptr[rbp + 16], 1
-    je calleeFramePopped
-    mov rbp, qword ptr[rbp]
-
-calleeFramePopped:
-    mov rbx, qword ptr[rbp + 32] ; VM.topCallFrame
-    mov r10, qword ptr[rbp + 24]
-    mov qword ptr[rbx], r10
-    add rsp, 28h
-    pop rdi
-    pop rsi
-    pop rbx
-    pop r15
-    pop r14
-    pop r13
-    pop r12
-    pop rbp
-    ret
-callToNativeFunction ENDP
-
-handleUncaughtException PROC
-    add rsp, 28h
-    pop rdi
-    pop rsi
-    pop rbx
-    pop r15
-    pop r14
-    pop r13
-    pop r12
-    pop rbp
-    ret
-handleUncaughtException ENDP
-        
-getHostCallReturnValue PROC
-    mov rbp, [rbp] ; CallFrame
-    mov rcx, rbp ; rcx is first argument register on Windows
-    jmp getHostCallReturnValueWithExecState
-getHostCallReturnValue ENDP
-
-_TEXT   ENDS
-
-END
</del></span></pre></div>
<a id="branchesjsCStackSourceJavaScriptCorejitJITStubsX86h"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/JavaScriptCore/jit/JITStubsX86.h (162576 => 162577)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/JavaScriptCore/jit/JITStubsX86.h        2014-01-23 02:01:39 UTC (rev 162576)
+++ branches/jsCStack/Source/JavaScriptCore/jit/JITStubsX86.h        2014-01-23 02:02:37 UTC (rev 162577)
</span><span class="lines">@@ -200,240 +200,6 @@
</span><span class="cx"> 
</span><span class="cx"> #endif // COMPILER(GCC)
</span><span class="cx"> 
</span><del>-#if COMPILER(MSVC)
-
-extern &quot;C&quot; {
-
-    // 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.
-
-    // FIXME: This code is stale and need to be updated for the following:
-    // 1. The prototype is now:
-    //        EncodedJSValue callToJavaScript(void* code, VM*, ProtoCallFrame*)
-    //    I've left the old prototype in place to give context for what the implementation
-    //    below is doing.
-    //
-    // 2. Need to add code for a stack check to ensure that we have enough stack space
-    //    for incoming args.
-    
-    __declspec(naked) EncodedJSValue callToJavaScript(void* code, ExecState**, ProtoCallFrame*, Register*)
-    {
-        __asm {
-            mov edx, [esp]
-            push ebp;
-            mov eax, ebp;
-            mov ebp, esp;
-            push esi;
-            push edi;
-            push ebx;
-            sub esp, 0x1c;
-            mov ecx, dword ptr[esp + 0x34];
-            mov esi, dword ptr[esp + 0x38];
-            mov ebp, dword ptr[esp + 0x3c];
-            sub ebp, 0x20;
-            mov dword ptr[ebp + 0x24], 0;
-            mov dword ptr[ebp + 0x20], 0;
-            mov dword ptr[ebp + 0x1c], 0;
-            mov dword ptr[ebp + 0x18], ecx;
-            mov ebx, [ecx];
-            mov dword ptr[ebp + 0x14], 0;
-            mov dword ptr[ebp + 0x10], ebx;
-            mov dword ptr[ebp + 0xc], 0;
-            mov dword ptr[ebp + 0x8], 1;
-            mov dword ptr[ebp + 0x4], edx;
-            mov dword ptr[ebp], eax;
-            mov eax, ebp;
-
-            mov edx, dword ptr[esi + 0x28];
-            add edx, 5;
-            sal edx, 3;
-            sub ebp, edx;
-            mov dword ptr[ebp], eax;
-
-            mov eax, 5;
-
-        copyHeaderLoop:
-            sub eax, 1;
-            mov ecx, dword ptr[esi + eax * 8];
-            mov dword ptr 8[ebp + eax * 8], ecx;
-            mov ecx, dword ptr 4[esi + eax * 8];
-            mov dword ptr 12[ebp + eax * 8], ecx;
-            test eax, eax;
-            jnz copyHeaderLoop;
-
-            mov edx, dword ptr[esi + 0x18];
-            sub edx, 1;
-            mov ecx, dword ptr[esi + 0x28];
-            sub ecx, 1;
-
-            cmp edx, ecx;
-            je copyArgs;
-
-            xor eax, eax;
-            mov ebx, -4;
-
-        fillExtraArgsLoop:
-            sub ecx, 1;
-            mov dword ptr 0x30[ebp + ecx * 8], eax;            
-            mov dword ptr 0x34[ebp + ecx * 8], ebx;
-            cmp edx, ecx;
-            jne fillExtraArgsLoop;
-
-        copyArgs:
-            mov eax, dword ptr[esi + 0x2c];
-
-        copyArgsLoop:
-            test edx, edx;
-            jz copyArgsDone;
-            sub edx, 1;
-            mov ecx, dword ptr 0[eax + edx * 8];
-            mov ebx, dword ptr 4[eax + edx * 8];
-            mov dword ptr 0x30[ebp + edx * 8], ecx;
-            mov dword ptr 0x34[ebp + edx * 8], ebx;
-            jmp copyArgsLoop;
-
-        copyArgsDone:
-            mov ecx, dword ptr[esp + 0x34];
-            mov dword ptr[ecx], ebp;
-
-            call dword ptr[esp + 0x30];
-
-            cmp dword ptr[ebp + 8], 1;
-            je calleeFramePopped;
-            mov ebp, dword ptr[ebp];
-
-        calleeFramePopped:
-            mov ecx, dword ptr[ebp + 0x18];
-            mov ebx, dword ptr[ebp + 0x10];
-            mov dword ptr[ecx], ebx;
-
-            add esp, 0x1c;
-            pop ebx;
-            pop edi;
-            pop esi;
-            pop ebp;
-            ret;
-        }
-    }
-
-    __declspec(naked) void handleUncaughtException()
-    {
-        __asm {
-            add esp, 0x1c;
-            pop ebx;
-            pop edi;
-            pop esi;
-            pop ebp;
-            ret;
-        }
-    }
-
-    __declspec(naked) EncodedJSValue callToNativeFunction(void* code, ExecState**, ProtoCallFrame*, Register*)
-    {
-        __asm {
-            mov edx, [esp]
-            push ebp;
-            mov eax, ebp;
-            mov ebp, esp;
-            push esi;
-            push edi;
-            push ebx;
-            sub esp, 0x1c;
-            mov ecx, [esp + 0x34];
-            mov esi, [esp + 0x38];
-            mov ebp, [esp + 0x3c];
-            sub ebp, 0x20;
-            mov dword ptr[ebp + 0x24], 0;
-            mov dword ptr[ebp + 0x20], 0;
-            mov dword ptr[ebp + 0x1c], 0;
-            mov dword ptr[ebp + 0x18], ecx;
-            mov ebx, [ecx];
-            mov dword ptr[ebp + 0x14], 0;
-            mov dword ptr[ebp + 0x10], ebx;
-            mov dword ptr[ebp + 0xc], 0;
-            mov dword ptr[ebp + 0x8], 1;
-            mov dword ptr[ebp + 0x4], edx;
-            mov dword ptr[ebp], eax;
-            mov eax, ebp;
-
-            mov edx, dword ptr[esi + 0x28];
-            add edx, 5;
-            sal edx, 3;
-            sub ebp, edx;
-            mov dword ptr[ebp], eax;
-
-            mov eax, 5;
-
-        copyHeaderLoop:
-            sub eax, 1;
-            mov ecx, dword ptr[esi + eax * 8];
-            mov dword ptr 8[ebp + eax * 8], ecx;
-            mov ecx, dword ptr 4[esi + eax * 8];
-            mov dword ptr 12[ebp + eax * 8], ecx;
-            test eax, eax;
-            jnz copyHeaderLoop;
-
-            mov edx, dword ptr[esi + 0x18];
-            sub edx, 1;
-            mov ecx, dword ptr[esi + 0x28];
-            sub ecx, 1;
-
-            cmp edx, ecx;
-            je copyArgs;
-
-            xor eax, eax;
-            mov ebx, -4;
-
-        fillExtraArgsLoop:
-            sub ecx, 1;
-            mov dword ptr 0x30[ebp + ecx * 8], eax;            
-            mov dword ptr 0x34[ebp + ecx * 8], ebx;
-            cmp edx, ecx;
-            jne fillExtraArgsLoop;
-
-        copyArgs:
-            mov eax, dword ptr[esi + 0x2c];
-
-        copyArgsLoop:
-            test edx, edx;
-            jz copyArgsDone;
-            sub edx, 1;
-            mov ecx, dword ptr 0[eax + edx * 8];
-            mov ebx, dword ptr 4[eax + edx * 8];
-            mov dword ptr 0x30[ebp + edx * 8], ecx;
-            mov dword ptr 0x34[ebp + edx * 8], ebx;
-            jmp copyArgsLoop;
-
-        copyArgsDone:
-            mov ecx, dword ptr[esp + 0x34];
-            mov dword ptr[ecx], ebp;
-
-            mov edi, dword ptr[esp + 0x30];
-            mov dword ptr[esp + 0x30], ebp;
-            mov ecx, ebp;
-            call edi;
-
-            cmp dword ptr[ebp + 8], 1;
-            je calleeFramePopped;
-            mov ebp, dword ptr[ebp];
-
-        calleeFramePopped:
-            mov ecx, dword ptr[ebp + 0x18];
-            mov ebx, dword ptr[ebp + 0x10];
-            mov dword ptr[ecx], ebx;
-
-            add esp, 0x1c;
-            pop ebx;
-            pop edi;
-            pop esi;
-            pop ebp;
-            ret;
-        }
-    }
-}
-
-#endif // COMPILER(MSVC)
-
</del><span class="cx"> } // namespace JSC
</span><span class="cx"> 
</span><span class="cx"> #endif // JITStubsX86_h
</span></span></pre></div>
<a id="branchesjsCStackSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/WTF/ChangeLog (162576 => 162577)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/WTF/ChangeLog        2014-01-23 02:01:39 UTC (rev 162576)
+++ branches/jsCStack/Source/WTF/ChangeLog        2014-01-23 02:02:37 UTC (rev 162577)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-01-22  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Switching Windows port to using the C Loop LLINT.
+        https://bugs.webkit.org/show_bug.cgi?id=127228.
+
+        Reviewed by Geoffrey Garen.
+
+        * wtf/Platform.h:
+        - Disabling the JIT for all Windows ports, which enables the C Loop LLINT.
+
</ins><span class="cx"> 2014-01-22  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge trunk r160838
</span></span></pre></div>
<a id="branchesjsCStackSourceWTFwtfPlatformh"></a>
<div class="modfile"><h4>Modified: branches/jsCStack/Source/WTF/wtf/Platform.h (162576 => 162577)</h4>
<pre class="diff"><span>
<span class="info">--- branches/jsCStack/Source/WTF/wtf/Platform.h        2014-01-23 02:01:39 UTC (rev 162576)
+++ branches/jsCStack/Source/WTF/wtf/Platform.h        2014-01-23 02:02:37 UTC (rev 162577)
</span><span class="lines">@@ -678,13 +678,13 @@
</span><span class="cx"> #define ENABLE_JIT 0
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-/* The JIT is enabled by default on all x86, x86-64, ARM &amp; MIPS platforms except Win64. */
</del><ins>+/* The JIT is enabled by default on all x86, x86-64, ARM &amp; MIPS platforms except Windows. */
</ins><span class="cx"> #if !defined(ENABLE_JIT) \
</span><span class="cx">     &amp;&amp; (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)) \
</span><span class="cx">     &amp;&amp; (OS(DARWIN) || !COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 1, 0)) \
</span><span class="cx">     &amp;&amp; !OS(WINCE) \
</span><span class="cx">     &amp;&amp; !OS(QNX) \
</span><del>-    &amp;&amp; !(OS(WINDOWS) &amp;&amp; CPU(X86_64))
</del><ins>+    &amp;&amp; !OS(WINDOWS)
</ins><span class="cx"> #define ENABLE_JIT 1
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>