<!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>[162256] 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/162256">162256</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2014-01-18 09:55:07 -0800 (Sat, 18 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Adding UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn()..
https://bugs.webkit.org/show_bug.cgi?id=127127.

Reviewed by Geoffrey Garen.

In order to implement bytecode level breakpoints, we need a mechanism
for computing the best fit op_debug bytecode offset for any valid given
line and column value in the source. The &quot;best fit&quot; op_debug bytecode
in this case is defined below in the comment for
UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn().

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::opDebugBytecodeOffsetForLineAndColumn):
- Convert the line and column to unlinked line and column values and
  pass them to UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn()
  to do the real work.

* bytecode/CodeBlock.h:
* bytecode/LineColumnInfo.h: Added.
(JSC::LineColumnInfo::operator &lt;):
(JSC::LineColumnInfo::LineColumnPair::LineColumnPair):
(JSC::LineColumnInfo::operator ==):
(JSC::LineColumnInfo::operator !=):
(JSC::LineColumnInfo::operator &lt;=):
(JSC::LineColumnInfo::operator &gt;):
(JSC::LineColumnInfo::operator &gt;=):
* bytecode/LineInfo.h: Removed.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::decodeExpressionRangeLineAndColumn):
- Factored this out of expressionRangeForBytecodeOffset() so that it can
  be called from multiple places.
(JSC::dumpLineColumnEntry):
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo):
(JSC::UnlinkedCodeBlock::dumpOpDebugLineColumnInfoList):
- Some dumpers for debugging use only.
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
(JSC::UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn):
- Finds the earliest op_debug bytecode whose line and column matches the
  specified line and column values. If an exact match is not found, then
  finds the nearest op_debug bytecode that precedes the specified line
  and column values. If there are more than one op_debug at that preceding
  line and column value, then the earliest of those op_debug bytecodes will
  be be selected. The offset of the selected bytecode will be returned.

  We want the earliest one because when we have multiple op_debug bytecodes
  that map to a given line and column, a debugger user would expect to break
  on the first one and step through the rest thereafter if needed.

(JSC::compareLineColumnInfo):
(JSC::UnlinkedCodeBlock::opDebugLineColumnInfoList):
- Creates the sorted opDebugLineColumnInfoList on demand. This list is
  stored in the UnlinkedCodeBlock's rareData.
* bytecode/UnlinkedCodeBlock.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreGNUmakefilelistam">trunk/Source/JavaScriptCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockh">trunk/Source/JavaScriptCore/bytecode/CodeBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh">trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeLineColumnInfoh">trunk/Source/JavaScriptCore/bytecode/LineColumnInfo.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorebytecodeLineInfoh">trunk/Source/JavaScriptCore/bytecode/LineInfo.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -1,3 +1,64 @@
</span><ins>+2014-01-18  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Adding UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn()..
+        https://bugs.webkit.org/show_bug.cgi?id=127127.
+
+        Reviewed by Geoffrey Garen.
+
+        In order to implement bytecode level breakpoints, we need a mechanism
+        for computing the best fit op_debug bytecode offset for any valid given
+        line and column value in the source. The &quot;best fit&quot; op_debug bytecode
+        in this case is defined below in the comment for
+        UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn().
+
+        * GNUmakefile.list.am:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::opDebugBytecodeOffsetForLineAndColumn):
+        - Convert the line and column to unlinked line and column values and
+          pass them to UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn()
+          to do the real work.
+
+        * bytecode/CodeBlock.h:
+        * bytecode/LineColumnInfo.h: Added.
+        (JSC::LineColumnInfo::operator &lt;):
+        (JSC::LineColumnInfo::LineColumnPair::LineColumnPair):
+        (JSC::LineColumnInfo::operator ==):
+        (JSC::LineColumnInfo::operator !=):
+        (JSC::LineColumnInfo::operator &lt;=):
+        (JSC::LineColumnInfo::operator &gt;):
+        (JSC::LineColumnInfo::operator &gt;=):
+        * bytecode/LineInfo.h: Removed.
+
+        * bytecode/UnlinkedCodeBlock.cpp:
+        (JSC::UnlinkedCodeBlock::decodeExpressionRangeLineAndColumn):
+        - Factored this out of expressionRangeForBytecodeOffset() so that it can
+          be called from multiple places.
+        (JSC::dumpLineColumnEntry):
+        (JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo):
+        (JSC::UnlinkedCodeBlock::dumpOpDebugLineColumnInfoList):
+        - Some dumpers for debugging use only.
+        (JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
+        (JSC::UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn):
+        - Finds the earliest op_debug bytecode whose line and column matches the
+          specified line and column values. If an exact match is not found, then
+          finds the nearest op_debug bytecode that precedes the specified line
+          and column values. If there are more than one op_debug at that preceding
+          line and column value, then the earliest of those op_debug bytecodes will
+          be be selected. The offset of the selected bytecode will be returned.
+
+          We want the earliest one because when we have multiple op_debug bytecodes
+          that map to a given line and column, a debugger user would expect to break
+          on the first one and step through the rest thereafter if needed.
+
+        (JSC::compareLineColumnInfo):
+        (JSC::UnlinkedCodeBlock::opDebugLineColumnInfoList):
+        - Creates the sorted opDebugLineColumnInfoList on demand. This list is
+          stored in the UnlinkedCodeBlock's rareData.
+        * bytecode/UnlinkedCodeBlock.h:
+
</ins><span class="cx"> 2014-01-18  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Inspector scripts are not compatible with Python v3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/GNUmakefile.list.am (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/GNUmakefile.list.am        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -152,7 +152,7 @@
</span><span class="cx">         Source/JavaScriptCore/bytecode/LLIntCallLinkInfo.h \
</span><span class="cx">         Source/JavaScriptCore/bytecode/LazyOperandValueProfile.cpp \
</span><span class="cx">         Source/JavaScriptCore/bytecode/LazyOperandValueProfile.h \
</span><del>-        Source/JavaScriptCore/bytecode/LineInfo.h \
</del><ins>+        Source/JavaScriptCore/bytecode/LineColumnInfo.h \
</ins><span class="cx">         Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.cpp \
</span><span class="cx">         Source/JavaScriptCore/bytecode/MethodOfGettingAValueProfile.h \
</span><span class="cx">         Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -816,7 +816,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\Instruction.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\JumpTable.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\LazyOperandValueProfile.h&quot; /&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\bytecode\LineInfo.h&quot; /&gt;
</del><ins>+    &lt;ClInclude Include=&quot;..\bytecode\LineColumnInfo.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\LLIntCallLinkInfo.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\MethodOfGettingAValueProfile.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\Opcode.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -1502,7 +1502,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\LazyOperandValueProfile.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;bytecode&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><del>-    &lt;ClInclude Include=&quot;..\bytecode\LineInfo.h&quot;&gt;
</del><ins>+    &lt;ClInclude Include=&quot;..\bytecode\LineColumnInfo.h&quot;&gt;
</ins><span class="cx">       &lt;Filter&gt;bytecode&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\bytecode\LLIntCallLinkInfo.h&quot;&gt;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -65,7 +65,6 @@
</span><span class="cx">                 0F0B83A714BCF50700885B4F /* CodeType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83A514BCF50400885B4F /* CodeType.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F0B83A914BCF56200885B4F /* HandlerInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                0F0B83AD14BCF60400885B4F /* LineInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AC14BCF60200885B4F /* LineInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 0F0B83B014BCF71600885B4F /* CallLinkInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */; };
</span><span class="cx">                 0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1313,6 +1312,7 @@
</span><span class="cx">                 E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */; };
</span><span class="cx">                 FE20CE9E15F04A9500DF3430 /* LLIntCLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                FE37DD56183C1E880018B2F0 /* LineColumnInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = FE37DD55183C1E880018B2F0 /* LineColumnInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 FE4A331F15BD2E07006F54F3 /* VMInspector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE4A331D15BD2E07006F54F3 /* VMInspector.cpp */; };
</span><span class="cx">                 FE4A332015BD2E07006F54F3 /* VMInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = FE4A331E15BD2E07006F54F3 /* VMInspector.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 FE5932A7183C5A2600A1ECCC /* VMEntryScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE5932A5183C5A2600A1ECCC /* VMEntryScope.cpp */; };
</span><span class="lines">@@ -1435,7 +1435,6 @@
</span><span class="cx">                 0F0B83A514BCF50400885B4F /* CodeType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F0B83A814BCF55E00885B4F /* HandlerInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HandlerInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F0B83AA14BCF5B900885B4F /* ExpressionRangeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExpressionRangeInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                0F0B83AC14BCF60200885B4F /* LineInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><span class="cx">                 0F0B83AE14BCF71400885B4F /* CallLinkInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallLinkInfo.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F0B83AF14BCF71400885B4F /* CallLinkInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallLinkInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 0F0B83B814BCF95B00885B4F /* CallReturnOffsetToBytecodeOffset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallReturnOffsetToBytecodeOffset.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -2723,6 +2722,7 @@
</span><span class="cx">                 F692A8870255597D01FF60F7 /* JSCJSValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCJSValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; };
</span><span class="cx">                 FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntCLoop.cpp; path = llint/LLIntCLoop.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FE20CE9C15F04A9500DF3430 /* LLIntCLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLIntCLoop.h; path = llint/LLIntCLoop.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                FE37DD55183C1E880018B2F0 /* LineColumnInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineColumnInfo.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 FE4A331D15BD2E07006F54F3 /* VMInspector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMInspector.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FE4A331E15BD2E07006F54F3 /* VMInspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VMInspector.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 FE5932A5183C5A2600A1ECCC /* VMEntryScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMEntryScope.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4230,6 +4230,7 @@
</span><span class="cx">                 969A078F0ED1D3AE00F1F681 /* bytecode */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                FE37DD55183C1E880018B2F0 /* LineColumnInfo.h */,
</ins><span class="cx">                                 0F8335B41639C1E3001443B5 /* ArrayAllocationProfile.cpp */,
</span><span class="cx">                                 0F8335B51639C1E3001443B5 /* ArrayAllocationProfile.h */,
</span><span class="cx">                                 0F63945115D07051006A597C /* ArrayProfile.cpp */,
</span><span class="lines">@@ -4280,7 +4281,6 @@
</span><span class="cx">                                 BCFD8C910EEB2EE700283848 /* JumpTable.h */,
</span><span class="cx">                                 0FB5467814F5C468002C2989 /* LazyOperandValueProfile.cpp */,
</span><span class="cx">                                 0FB5467614F59AD1002C2989 /* LazyOperandValueProfile.h */,
</span><del>-                                0F0B83AC14BCF60200885B4F /* LineInfo.h */,
</del><span class="cx">                                 0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */,
</span><span class="cx">                                 0FB5467C14F5CFD3002C2989 /* MethodOfGettingAValueProfile.cpp */,
</span><span class="cx">                                 0FB5467A14F5C7D4002C2989 /* MethodOfGettingAValueProfile.h */,
</span><span class="lines">@@ -4471,6 +4471,7 @@
</span><span class="cx">                                 C2FCAE1117A9C24E0034C735 /* BytecodeBasicBlock.h in Headers */,
</span><span class="cx">                                 A532439418569709002ED692 /* generate-combined-inspector-json.py in Headers */,
</span><span class="cx">                                 C2FCAE1317A9C24E0034C735 /* BytecodeLivenessAnalysis.h in Headers */,
</span><ins>+                                FE37DD56183C1E880018B2F0 /* LineColumnInfo.h in Headers */,
</ins><span class="cx">                                 0F8335B81639C1EA001443B5 /* ArrayAllocationProfile.h in Headers */,
</span><span class="cx">                                 A5840E29187CA5E600843B10 /* inline-and-minify-stylesheets-and-scripts.py in Headers */,
</span><span class="cx">                                 A5840E2B187CA75B00843B10 /* jsmin.py in Headers */,
</span><span class="lines">@@ -4936,7 +4937,6 @@
</span><span class="cx">                                 BC18C4310E16F5CD00B34460 /* Lexer.h in Headers */,
</span><span class="cx">                                 BC18C52E0E16FCE100B34460 /* Lexer.lut.h in Headers */,
</span><span class="cx">                                 A513E5CB185F9624007E95AD /* InjectedScriptManager.h in Headers */,
</span><del>-                                0F0B83AD14BCF60400885B4F /* LineInfo.h in Headers */,
</del><span class="cx">                                 86D3B3C310159D7F002865E7 /* LinkBuffer.h in Headers */,
</span><span class="cx">                                 0F431738146BAC69007E3890 /* ListableHandler.h in Headers */,
</span><span class="cx">                                 A7E2EA6B0FB460CF00601F06 /* LiteralParser.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) 2008 Cameron Zwarich &lt;cwzwarich@uwaterloo.ca&gt;
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -2565,6 +2565,23 @@
</span><span class="cx">     line += m_ownerExecutable-&gt;lineNo();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+unsigned CodeBlock::opDebugBytecodeOffsetForLineAndColumn(unsigned&amp; line, unsigned&amp; column)
+{
+    unsigned lineAdjustment = m_ownerExecutable-&gt;lineNo();
+    ASSERT(line &gt;= lineAdjustment);
+    unsigned unlinkedLine = line - lineAdjustment;
+    unsigned columnAdjustment = unlinkedLine ? 1 : firstLineColumnOffset();
+    ASSERT(column &gt;= columnAdjustment);
+    unsigned unlinkedColumn = column - columnAdjustment;
+
+    unsigned bytecodeOffset = m_unlinkedCode-&gt;opDebugBytecodeOffsetForLineAndColumn(unlinkedLine, unlinkedColumn);
+    if (bytecodeOffset != static_cast&lt;unsigned&gt;(WTF::notFound)) {
+        line = unlinkedLine + lineAdjustment;
+        column = unlinkedColumn + (unlinkedLine ? 1 : firstLineColumnOffset());
+    }
+    return bytecodeOffset;
+}
+
</ins><span class="cx"> void CodeBlock::shrinkToFit(ShrinkMode shrinkMode)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.h (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.h        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.h        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) 2008 Cameron Zwarich &lt;cwzwarich@uwaterloo.ca&gt;
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -65,7 +65,6 @@
</span><span class="cx"> #include &quot;JumpTable.h&quot;
</span><span class="cx"> #include &quot;LLIntCallLinkInfo.h&quot;
</span><span class="cx"> #include &quot;LazyOperandValueProfile.h&quot;
</span><del>-#include &quot;LineInfo.h&quot;
</del><span class="cx"> #include &quot;ProfilerCompilation.h&quot;
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><span class="cx"> #include &quot;StructureStubInfo.h&quot;
</span><span class="lines">@@ -175,6 +174,7 @@
</span><span class="cx">     unsigned columnNumberForBytecodeOffset(unsigned bytecodeOffset);
</span><span class="cx">     void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int&amp; divot,
</span><span class="cx">                                           int&amp; startOffset, int&amp; endOffset, unsigned&amp; line, unsigned&amp; column);
</span><ins>+    unsigned opDebugBytecodeOffsetForLineAndColumn(unsigned&amp; line, unsigned&amp; column);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(JIT)
</span><span class="cx">     StructureStubInfo* addStubInfo();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeLineColumnInfoh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/bytecode/LineColumnInfo.h (0 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/LineColumnInfo.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/bytecode/LineColumnInfo.h        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -0,0 +1,97 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * 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. 
+ */
+
+#ifndef LineColumnInfo_h
+#define LineColumnInfo_h
+
+namespace JSC {
+
+struct LineColumnInfo {
+    unsigned instructionOffset;
+    unsigned line;
+    unsigned column;
+
+    bool operator &lt;(const LineColumnInfo&amp; other) const
+    {
+        if (line == other.line) {
+            if (column == other.column)
+                return instructionOffset &lt; other.instructionOffset;
+            return column &lt; other.column;
+        }
+        return line &lt; other.line;
+    }
+
+    struct LineColumnPair {
+        LineColumnPair(unsigned line, unsigned column)
+            : line(line), column(column)
+        {
+        }
+
+        unsigned line;
+        unsigned column;
+    };
+
+    bool operator ==(const LineColumnPair&amp; pair) const
+    {
+        return  (line == pair.line) &amp;&amp; (column == pair.column);
+    }
+
+    bool operator !=(const LineColumnPair&amp; pair) const
+    {
+        return  (line != pair.line) || (column != pair.column);
+    }
+
+    bool operator &lt;(const LineColumnPair&amp; pair) const
+    {
+        if (line == pair.line)
+            return column &lt; pair.column;
+        return line &lt; pair.line;
+    }
+
+    bool operator &lt;=(const LineColumnPair&amp; pair) const
+    {
+        if (line == pair.line)
+            return column &lt;= pair.column;
+        return line &lt; pair.line;
+    }
+
+    bool operator &gt;(const LineColumnPair&amp; pair) const
+    {
+        if (line == pair.line)
+            return column &gt; pair.column;
+        return line &gt; pair.line;
+    }
+
+    bool operator &gt;=(const LineColumnPair&amp; pair) const
+    {
+        if (line == pair.line)
+            return column &gt;= pair.column;
+        return line &gt; pair.line;
+    }
+};
+
+} // namespace JSC
+
+#endif // LineColumnInfo_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeLineInfoh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/bytecode/LineInfo.h (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/LineInfo.h        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/bytecode/LineInfo.h        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * 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. 
- */
-
-#ifndef LineInfo_h
-#define LineInfo_h
-
-#include &lt;wtf/StdLibExtras.h&gt;
-
-namespace JSC {
-
-struct LineInfo {
-    uint32_t instructionOffset;
-    int32_t lineNumber;
-};
-
-} // namespace JSC
-
-#endif // LineInfo_h
-
</del></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &quot;SourceProvider.h&quot;
</span><span class="cx"> #include &quot;Structure.h&quot;
</span><span class="cx"> #include &quot;SymbolTable.h&quot;
</span><ins>+#include &lt;wtf/DataLog.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="lines">@@ -256,6 +257,74 @@
</span><span class="cx">     return line;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline void UnlinkedCodeBlock::getLineAndColumn(ExpressionRangeInfo&amp; info,
+    unsigned&amp; line, unsigned&amp; column)
+{
+    switch (info.mode) {
+    case ExpressionRangeInfo::FatLineMode:
+        info.decodeFatLineMode(line, column);
+        break;
+    case ExpressionRangeInfo::FatColumnMode:
+        info.decodeFatColumnMode(line, column);
+        break;
+    case ExpressionRangeInfo::FatLineAndColumnMode: {
+        unsigned fatIndex = info.position;
+        ExpressionRangeInfo::FatPosition&amp; fatPos = m_rareData-&gt;m_expressionInfoFatPositions[fatIndex];
+        line = fatPos.line;
+        column = fatPos.column;
+        break;
+    }
+    } // switch
+}
+
+#ifndef NDEBUG
+static void dumpLineColumnEntry(size_t index, const RefCountedArray&lt;UnlinkedInstruction&gt;&amp; instructions, unsigned instructionOffset, unsigned line, unsigned column)
+{
+    OpcodeID opcode = instructions[instructionOffset].u.opcode;
+    const char* event = &quot;&quot;;
+    if (opcode == op_debug) {
+        switch (instructions[instructionOffset + 1].u.operand) {
+        case WillExecuteProgram: event = &quot; WillExecuteProgram&quot;; break;
+        case DidExecuteProgram: event = &quot; DidExecuteProgram&quot;; break;
+        case DidEnterCallFrame: event = &quot; DidEnterCallFrame&quot;; break;
+        case DidReachBreakpoint: event = &quot; DidReachBreakpoint&quot;; break;
+        case WillLeaveCallFrame: event = &quot; WillLeaveCallFrame&quot;; break;
+        case WillExecuteStatement: event = &quot; WillExecuteStatement&quot;; break;
+        }
+    }
+    dataLogF(&quot;  [%zu] pc %u @ line %u col %u : %s%s\n&quot;, index, instructionOffset, line, column, opcodeNames[opcode], event);
+}
+
+void UnlinkedCodeBlock::dumpExpressionRangeInfo()
+{
+    Vector&lt;ExpressionRangeInfo&gt;&amp; expressionInfo = m_expressionInfo;
+
+    size_t size = m_expressionInfo.size();
+    dataLogF(&quot;UnlinkedCodeBlock %p expressionRangeInfo[%zu] {\n&quot;, this, size);
+    for (size_t i = 0; i &lt; size; i++) {
+        ExpressionRangeInfo&amp; info = expressionInfo[i];
+        unsigned line;
+        unsigned column;
+        getLineAndColumn(info, line, column);
+        dumpLineColumnEntry(i, instructions(), info.instructionOffset, line, column);
+    }
+    dataLog(&quot;}\n&quot;);
+}
+
+void UnlinkedCodeBlock::dumpOpDebugLineColumnInfoList()
+{
+    LineColumnInfoList&amp; infoList = this-&gt;opDebugLineColumnInfoList();
+    size_t size = infoList.size();
+
+    dataLogF(&quot;UnlinkedCodeBlock %p opDebugLineColumnInfoList[%zu] {\n&quot;, this, size);
+    for (size_t i = 0; i &lt; size; i++) {
+        LineColumnInfo&amp; info = infoList[i];
+        dumpLineColumnEntry(i, instructions(), info.instructionOffset, info.line, info.column);
+    }
+    dataLog(&quot;}\n&quot;);
+}
+#endif
+
</ins><span class="cx"> void UnlinkedCodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset,
</span><span class="cx">     int&amp; divot, int&amp; startOffset, int&amp; endOffset, unsigned&amp; line, unsigned&amp; column)
</span><span class="cx"> {
</span><span class="lines">@@ -289,22 +358,78 @@
</span><span class="cx">     startOffset = info.startOffset;
</span><span class="cx">     endOffset = info.endOffset;
</span><span class="cx">     divot = info.divotPoint;
</span><ins>+    getLineAndColumn(info, line, column);
+}
</ins><span class="cx"> 
</span><del>-    switch (info.mode) {
-    case ExpressionRangeInfo::FatLineMode:
-        info.decodeFatLineMode(line, column);
-        break;
-    case ExpressionRangeInfo::FatColumnMode:
-        info.decodeFatColumnMode(line, column);
-        break;
-    case ExpressionRangeInfo::FatLineAndColumnMode: {
-        unsigned fatIndex = info.position;
-        ExpressionRangeInfo::FatPosition&amp; fatPos = m_rareData-&gt;m_expressionInfoFatPositions[fatIndex];
-        line = fatPos.line;
-        column = fatPos.column;
-        break;
</del><ins>+unsigned UnlinkedCodeBlock::opDebugBytecodeOffsetForLineAndColumn(unsigned&amp; line, unsigned&amp; column)
+{
+    if (!m_expressionInfo.size())
+        return static_cast&lt;unsigned&gt;(WTF::notFound);
+
+    LineColumnInfo::LineColumnPair target(line, column);
+    LineColumnInfoList&amp; list = opDebugLineColumnInfoList();
+
+    // Find the earliest op_debug bytecode whose line and column matches the
+    // target line and column values. If an exact match is not found, then
+    // find the nearest op_debug bytecode that precedes the target line and
+    // column values. If there are more than one op_debug at that preceding
+    // line and column value, then select the earliest of those.
+    //
+    // We want the earliest one because when we have multiple op_debug bytecodes
+    // that map to a given line and column, a debugger user would expect to break
+    // on the first one and step through the rest thereafter if needed.
+
+    LineColumnInfoList::iterator it = std::lower_bound(list.begin(), list.end(), target);
+    if (it == list.end() || *it &gt; target)
+        --it;
+    ASSERT(it &gt;= list.begin() &amp;&amp; it &lt; list.end() &amp;&amp; *it &lt;= target);
+    ASSERT(it == list.begin() || *(it - 1) &lt; *it);
+
+    line = it-&gt;line;
+    column = it-&gt;column;
+
+    unsigned offset = it-&gt;instructionOffset;
+    ASSERT(instructions()[offset].u.opcode == op_debug);
+
+    return offset;
+}
+
+static bool compareLineColumnInfo(const LineColumnInfo&amp; first, const LineColumnInfo&amp; second)
+{
+    return first &lt; second;
+}
+
+UnlinkedCodeBlock::LineColumnInfoList&amp; UnlinkedCodeBlock::opDebugLineColumnInfoList()
+{
+    createRareDataIfNecessary();
+
+    if (m_rareData-&gt;m_opDebugLineColumnInfoList) {
+        ASSERT(m_rareData-&gt;m_opDebugLineColumnInfoList-&gt;size() &lt;= m_expressionInfo.size());
+        return *m_rareData-&gt;m_opDebugLineColumnInfoList;
</ins><span class="cx">     }
</span><del>-    } // switch
</del><ins>+
+    Vector&lt;ExpressionRangeInfo&gt;&amp; expressionInfo = m_expressionInfo;
+    size_t size = m_expressionInfo.size();
+
+    m_rareData-&gt;m_opDebugLineColumnInfoList = std::make_unique&lt;LineColumnInfoList&gt;();
+    LineColumnInfoList&amp; infoList = *m_rareData-&gt;m_opDebugLineColumnInfoList;
+
+    for (size_t src = 0; src &lt; size; src++) {
+        ExpressionRangeInfo&amp; exprInfo = expressionInfo[src];
+        unsigned instructionOffset = exprInfo.instructionOffset;
+        OpcodeID opcode = instructions()[instructionOffset].u.opcode;
+        if (opcode == op_debug) {
+            LineColumnInfo info;
+            info.instructionOffset = instructionOffset;
+            getLineAndColumn(exprInfo, info.line, info.column);
+            infoList.append(info);
+        }
+    }
+    infoList.shrinkToFit();
+
+    std::sort(infoList.begin(), infoList.end(), compareLineColumnInfo);
+
+    return *m_rareData-&gt;m_opDebugLineColumnInfoList.get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void UnlinkedCodeBlock::addExpressionInfo(unsigned instructionOffset,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeUnlinkedCodeBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h (162255 => 162256)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2014-01-18 17:19:38 UTC (rev 162255)
+++ trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h        2014-01-18 17:55:07 UTC (rev 162256)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include &quot;Identifier.h&quot;
</span><span class="cx"> #include &quot;JSCell.h&quot;
</span><span class="cx"> #include &quot;JSString.h&quot;
</span><del>-#include &quot;LineInfo.h&quot;
</del><ins>+#include &quot;LineColumnInfo.h&quot;
</ins><span class="cx"> #include &quot;ParserModes.h&quot;
</span><span class="cx"> #include &quot;RegExp.h&quot;
</span><span class="cx"> #include &quot;SpecialPointer.h&quot;
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/Compression.h&gt;
</span><span class="cx"> #include &lt;wtf/RefCountedArray.h&gt;
</span><ins>+#include &lt;wtf/StdLibExtras.h&gt;
</ins><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="lines">@@ -444,6 +445,7 @@
</span><span class="cx"> 
</span><span class="cx">     void expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int&amp; divot,
</span><span class="cx">         int&amp; startOffset, int&amp; endOffset, unsigned&amp; line, unsigned&amp; column);
</span><ins>+    unsigned opDebugBytecodeOffsetForLineAndColumn(unsigned&amp; line, unsigned&amp; column);
</ins><span class="cx"> 
</span><span class="cx">     void recordParse(CodeFeatures features, bool hasCapturedVariables, unsigned firstLine, unsigned lineCount, unsigned endColumn)
</span><span class="cx">     {
</span><span class="lines">@@ -462,6 +464,9 @@
</span><span class="cx">     ALWAYS_INLINE unsigned startColumn() const { return 0; }
</span><span class="cx">     unsigned endColumn() const { return m_endColumn; }
</span><span class="cx"> 
</span><ins>+    void dumpExpressionRangeInfo(); // For debugging purpose only.
+    void dumpOpDebugLineColumnInfoList(); // For debugging purpose only.
+
</ins><span class="cx"> protected:
</span><span class="cx">     UnlinkedCodeBlock(VM*, Structure*, CodeType, const ExecutableInfo&amp;);
</span><span class="cx">     ~UnlinkedCodeBlock();
</span><span class="lines">@@ -482,6 +487,11 @@
</span><span class="cx">             m_rareData = adoptPtr(new RareData);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    void getLineAndColumn(ExpressionRangeInfo&amp;, unsigned&amp; line, unsigned&amp; column);
+
+    typedef Vector&lt;LineColumnInfo&gt; LineColumnInfoList;
+    LineColumnInfoList&amp; opDebugLineColumnInfoList();
+
</ins><span class="cx">     RefCountedArray&lt;UnlinkedInstruction&gt; m_unlinkedInstructions;
</span><span class="cx"> 
</span><span class="cx">     int m_numParameters;
</span><span class="lines">@@ -546,6 +556,7 @@
</span><span class="cx">         Vector&lt;UnlinkedStringJumpTable&gt; m_stringSwitchJumpTables;
</span><span class="cx"> 
</span><span class="cx">         Vector&lt;ExpressionRangeInfo::FatPosition&gt; m_expressionInfoFatPositions;
</span><ins>+        std::unique_ptr&lt;LineColumnInfoList&gt; m_opDebugLineColumnInfoList;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre>
</div>
</div>

</body>
</html>