<!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>[172767] trunk/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/172767">172767</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2014-08-19 15:25:28 -0700 (Tue, 19 Aug 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix indentation and style in LowLevelInterpreter.asm
https://bugs.webkit.org/show_bug.cgi?id=136083
Reviewed by Mark Lam.
* llint/LowLevelInterpreter.asm:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (172766 => 172767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-08-19 22:25:00 UTC (rev 172766)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-08-19 22:25:28 UTC (rev 172767)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2014-08-19 Filip Pizlo <fpizlo@apple.com>
+
+ Fix indentation and style in LowLevelInterpreter.asm
+ https://bugs.webkit.org/show_bug.cgi?id=136083
+
+ Reviewed by Mark Lam.
+
+ * llint/LowLevelInterpreter.asm:
+
</ins><span class="cx"> 2014-08-19 Magnus Granberg <zorry@gentoo.org>
</span><span class="cx">
</span><span class="cx"> TEXTREL in libjavascriptcoregtk-1.0.so.0.11.0 on x86 (or i586)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (172766 => 172767)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2014-08-19 22:25:00 UTC (rev 172766)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2014-08-19 22:25:28 UTC (rev 172767)
</span><span class="lines">@@ -33,12 +33,12 @@
</span><span class="cx"> # These declarations must match interpreter/JSStack.h.
</span><span class="cx">
</span><span class="cx"> if JSVALUE64
</span><del>-const PtrSize = 8
-const CallFrameHeaderSlots = 6
</del><ins>+ const PtrSize = 8
+ const CallFrameHeaderSlots = 6
</ins><span class="cx"> else
</span><del>-const PtrSize = 4
-const CallFrameHeaderSlots = 5
-const CallFrameAlignSlots = 1
</del><ins>+ const PtrSize = 4
+ const CallFrameHeaderSlots = 5
+ const CallFrameAlignSlots = 1
</ins><span class="cx"> end
</span><span class="cx"> const SlotSize = 8
</span><span class="cx">
</span><span class="lines">@@ -58,37 +58,37 @@
</span><span class="cx">
</span><span class="cx"> # Some value representation constants.
</span><span class="cx"> if JSVALUE64
</span><del>-const TagBitTypeOther = 0x2
-const TagBitBool = 0x4
-const TagBitUndefined = 0x8
-const ValueEmpty = 0x0
-const ValueFalse = TagBitTypeOther | TagBitBool
-const ValueTrue = TagBitTypeOther | TagBitBool | 1
-const ValueUndefined = TagBitTypeOther | TagBitUndefined
-const ValueNull = TagBitTypeOther
</del><ins>+ const TagBitTypeOther = 0x2
+ const TagBitBool = 0x4
+ const TagBitUndefined = 0x8
+ const ValueEmpty = 0x0
+ const ValueFalse = TagBitTypeOther | TagBitBool
+ const ValueTrue = TagBitTypeOther | TagBitBool | 1
+ const ValueUndefined = TagBitTypeOther | TagBitUndefined
+ const ValueNull = TagBitTypeOther
</ins><span class="cx"> else
</span><del>-const Int32Tag = -1
-const BooleanTag = -2
-const NullTag = -3
-const UndefinedTag = -4
-const CellTag = -5
-const EmptyValueTag = -6
-const DeletedValueTag = -7
-const LowestTag = DeletedValueTag
</del><ins>+ const Int32Tag = -1
+ const BooleanTag = -2
+ const NullTag = -3
+ const UndefinedTag = -4
+ const CellTag = -5
+ const EmptyValueTag = -6
+ const DeletedValueTag = -7
+ const LowestTag = DeletedValueTag
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> const CallOpCodeSize = 9
</span><span class="cx">
</span><span class="cx"> if X86_64 or ARM64 or C_LOOP
</span><del>-const maxFrameExtentForSlowPathCall = 0
</del><ins>+ const maxFrameExtentForSlowPathCall = 0
</ins><span class="cx"> elsif ARM or ARMv7_TRADITIONAL or ARMv7 or SH4
</span><del>-const maxFrameExtentForSlowPathCall = 24
</del><ins>+ const maxFrameExtentForSlowPathCall = 24
</ins><span class="cx"> elsif X86 or X86_WIN
</span><del>-const maxFrameExtentForSlowPathCall = 40
</del><ins>+ const maxFrameExtentForSlowPathCall = 40
</ins><span class="cx"> elsif MIPS
</span><del>-const maxFrameExtentForSlowPathCall = 40
</del><ins>+ const maxFrameExtentForSlowPathCall = 40
</ins><span class="cx"> elsif X86_64_WIN
</span><del>-const maxFrameExtentForSlowPathCall = 64
</del><ins>+ const maxFrameExtentForSlowPathCall = 64
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> # Watchpoint states
</span><span class="lines">@@ -568,34 +568,33 @@
</span><span class="cx"> addp maxFrameExtentForSlowPathCall, sp
</span><span class="cx"> end
</span><span class="cx"> codeBlockGetter(t1)
</span><del>-if C_LOOP
-else
- baddis 5, CodeBlock::m_llintExecuteCounter + BaselineExecutionCounter::m_counter[t1], .continue
- if JSVALUE64
- cCall2(osrSlowPath, cfr, PC)
- else
- # We are after the function prologue, but before we have set up sp from the CodeBlock.
- # Temporarily align stack pointer for this call.
- subp 8, sp
- cCall2(osrSlowPath, cfr, PC)
- addp 8, sp
</del><ins>+ if not C_LOOP
+ baddis 5, CodeBlock::m_llintExecuteCounter + BaselineExecutionCounter::m_counter[t1], .continue
+ if JSVALUE64
+ cCall2(osrSlowPath, cfr, PC)
+ else
+ # We are after the function prologue, but before we have set up sp from the CodeBlock.
+ # Temporarily align stack pointer for this call.
+ subp 8, sp
+ cCall2(osrSlowPath, cfr, PC)
+ addp 8, sp
+ end
+ btpz t0, .recover
+ move cfr, sp # restore the previous sp
+ # pop the callerFrame since we will jump to a function that wants to save it
+ if ARM64
+ pop lr, cfr
+ elsif ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS or SH4
+ pop cfr
+ pop lr
+ else
+ pop cfr
+ end
+ jmp t0
+ .recover:
+ codeBlockGetter(t1)
+ .continue:
</ins><span class="cx"> end
</span><del>- btpz t0, .recover
- move cfr, sp # restore the previous sp
- # pop the callerFrame since we will jump to a function that wants to save it
- if ARM64
- pop lr, cfr
- elsif ARM or ARMv7 or ARMv7_TRADITIONAL or MIPS or SH4
- pop cfr
- pop lr
- else
- pop cfr
- end
- jmp t0
-.recover:
- codeBlockGetter(t1)
-.continue:
-end
</del><span class="cx">
</span><span class="cx"> codeBlockSetter(t1)
</span><span class="cx">
</span><span class="lines">@@ -690,123 +689,119 @@
</span><span class="cx"> # EncodedJSValue vmEntryToNativeFunction(void* code, VM* vm, ProtoCallFrame* protoFrame)
</span><span class="cx">
</span><span class="cx"> if C_LOOP
</span><del>-_llint_vm_entry_to_javascript:
</del><ins>+ _llint_vm_entry_to_javascript:
</ins><span class="cx"> else
</span><del>-global _vmEntryToJavaScript
-_vmEntryToJavaScript:
</del><ins>+ global _vmEntryToJavaScript
+ _vmEntryToJavaScript:
</ins><span class="cx"> end
</span><span class="cx"> doVMEntry(makeJavaScriptCall)
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> if C_LOOP
</span><del>-_llint_vm_entry_to_native:
</del><ins>+ _llint_vm_entry_to_native:
</ins><span class="cx"> else
</span><del>-global _vmEntryToNative
-_vmEntryToNative:
</del><ins>+ global _vmEntryToNative
+ _vmEntryToNative:
</ins><span class="cx"> end
</span><span class="cx"> doVMEntry(makeHostFunctionCall)
</span><span class="cx">
</span><span class="cx">
</span><del>-if C_LOOP
-else
-# void sanitizeStackForVMImpl(VM* vm)
-global _sanitizeStackForVMImpl
-_sanitizeStackForVMImpl:
- if X86_64
- const vm = t4
- const address = t1
- const zeroValue = t0
- elsif X86_64_WIN
- const vm = t2
- const address = t1
- const zeroValue = t0
- elsif X86 or X86_WIN
- const vm = t2
- const address = t1
- const zeroValue = t0
- else
- const vm = a0
- const address = t1
- const zeroValue = t2
- end
</del><ins>+if not C_LOOP
+ # void sanitizeStackForVMImpl(VM* vm)
+ global _sanitizeStackForVMImpl
+ _sanitizeStackForVMImpl:
+ if X86_64
+ const vm = t4
+ const address = t1
+ const zeroValue = t0
+ elsif X86_64_WIN
+ const vm = t2
+ const address = t1
+ const zeroValue = t0
+ elsif X86 or X86_WIN
+ const vm = t2
+ const address = t1
+ const zeroValue = t0
+ else
+ const vm = a0
+ const address = t1
+ const zeroValue = t2
+ end
+
+ if X86 or X86_WIN
+ loadp 4[sp], vm
+ end
+
+ loadp VM::m_lastStackTop[vm], address
+ bpbeq sp, address, .zeroFillDone
+
+ move 0, zeroValue
+ .zeroFillLoop:
+ storep zeroValue, [address]
+ addp PtrSize, address
+ bpa sp, address, .zeroFillLoop
+
+ .zeroFillDone:
+ move sp, address
+ storep address, VM::m_lastStackTop[vm]
+ ret
+
+ # VMEntryRecord* vmEntryRecord(const VMEntryFrame* entryFrame)
+ global _vmEntryRecord
+ _vmEntryRecord:
+ if X86_64
+ const entryFrame = t4
+ const result = t0
+ elsif X86 or X86_WIN
+ const entryFrame = t2
+ const result = t0
+ else
+ const entryFrame = a0
+ const result = t0
+ end
+
+ if X86 or X86_WIN
+ loadp 4[sp], entryFrame
+ end
+
+ vmEntryRecord(entryFrame, result)
+ ret
+end
</ins><span class="cx">
</span><del>- if X86 or X86_WIN
- loadp 4[sp], vm
- end
-
- loadp VM::m_lastStackTop[vm], address
- bpbeq sp, address, .zeroFillDone
-
- move 0, zeroValue
-.zeroFillLoop:
- storep zeroValue, [address]
- addp PtrSize, address
- bpa sp, address, .zeroFillLoop
-
-.zeroFillDone:
- move sp, address
- storep address, VM::m_lastStackTop[vm]
- ret
-
</del><span class="cx"> if C_LOOP
</span><del>-else
-# VMEntryRecord* vmEntryRecord(const VMEntryFrame* entryFrame)
-global _vmEntryRecord
-_vmEntryRecord:
- if X86_64
- const entryFrame = t4
- const result = t0
- elsif X86 or X86_WIN
- const entryFrame = t2
- const result = t0
</del><ins>+ # Dummy entry point the C Loop uses to initialize.
+ _llint_entry:
+ crash()
</ins><span class="cx"> else
</span><del>- const entryFrame = a0
- const result = t0
- end
-
- if X86 or X86_WIN
- loadp 4[sp], entryFrame
- end
-
- vmEntryRecord(entryFrame, result)
- ret
</del><ins>+ macro initPCRelative(pcBase)
+ if X86_64 or X86_64_WIN
+ call _relativePCBase
+ _relativePCBase:
+ pop pcBase
+ elsif X86 or X86_WIN
+ call _relativePCBase
+ _relativePCBase:
+ pop pcBase
+ loadp 20[sp], t4
+ elsif ARM64
+ elsif ARMv7
+ _relativePCBase:
+ move pc, pcBase
+ subp 3, pcBase # Need to back up the PC and set the Thumb2 bit
+ elsif ARM or ARMv7_TRADITIONAL
+ _relativePCBase:
+ move pc, pcBase
+ subp 8, pcBase
+ elsif MIPS
+ crash() # Need to replace with any initialization steps needed to step up PC relative address calculation
+ elsif SH4
+ mova _relativePCBase, t0
+ move t0, pcBase
+ alignformova
+ _relativePCBase:
+ end
</ins><span class="cx"> end
</span><del>-end
</del><span class="cx">
</span><del>-if C_LOOP
-# Dummy entry point the C Loop uses to initialize.
-_llint_entry:
- crash()
-else
-macro initPCRelative(pcBase)
- if X86_64 or X86_64_WIN
- call _relativePCBase
- _relativePCBase:
- pop pcBase
- elsif X86 or X86_WIN
- call _relativePCBase
- _relativePCBase:
- pop pcBase
- loadp 20[sp], t4
- elsif ARM64
- elsif ARMv7
- _relativePCBase:
- move pc, pcBase
- subp 3, pcBase # Need to back up the PC and set the Thumb2 bit
- elsif ARM or ARMv7_TRADITIONAL
- _relativePCBase:
- move pc, pcBase
- subp 8, pcBase
- elsif MIPS
- crash() # Need to replace with any initialization steps needed to step up PC relative address calculation
- elsif SH4
- mova _relativePCBase, t0
- move t0, pcBase
- alignformova
- _relativePCBase:
- end
-end
-
</del><span class="cx"> macro setEntryAddress(index, label)
</span><span class="cx"> if X86_64
</span><span class="cx"> leap (label - _relativePCBase)[t1], t0
</span></span></pre>
</div>
</div>
</body>
</html>