<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2014-06-09 22:47:27 +0900 (Mon, 09 Jun 2014)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b">3dc3672aedc6f2e518c5d55562d175b00df4772b</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">mrb: move index resolve code on match to mruby</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#diff-0">lib/mrb/mrb_expr.c</a></li>
<li><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#diff-1">lib/mrb/scripts/scan_info.rb</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/mrb/mrb_expr.c (+2 -15)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L237">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L238">238</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L239">239</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L240">240</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L241">241</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L242">242</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L243">243</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L244">244</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L245">245</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L246">246</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L247">247</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L248">248</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L249">249</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L250">250</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L251">251</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L252">252</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L253">253</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L254">254</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L255">255</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L256">256</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L257">257</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0L258">258</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R237">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R238">238</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R239">239</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R240">240</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R241">241</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R242">242</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R243">243</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R244">244</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L0R245">245</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -238,21 +238,8 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">scan_info_build(grn_ctx *ctx, grn_obj *expr, int *n,</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mrb_value mrb_db_obj = grn_mrb_value_from_grn_obj(mrb, *p);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mrb_funcall(mrb, mrb_si, "match_resolve_index_db_obj", 1, mrb_db_obj);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else if (GRN_ACCESSORP(*p)) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- grn_scan_info_set_flags(si, grn_scan_info_get_flags(si) | SCAN_ACCESSOR);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if (grn_column_index(ctx, *p, c->op, &index, 1, &sid)) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_value mrb_accessor = grn_mrb_value_from_grn_obj(mrb, *p);</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if (!mrb_nil_p(mrb_funcall(mrb, mrb_accessor, "next", 0))) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_funcall(mrb, mrb_si, "put_index", 3,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_accessor,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_fixnum_value(sid),</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_fixnum_value(1));</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- } else {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_funcall(mrb, mrb_si, "put_index", 3,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- grn_mrb_value_from_grn_obj(mrb, index),</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_fixnum_value(sid),</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- mrb_fixnum_value(1));</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- }</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- }</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ mrb_value mrb_accessor = grn_mrb_value_from_grn_obj(mrb, *p);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ mrb_funcall(mrb, mrb_si, "match_resolve_index_accessor", 1, mrb_accessor);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> } else {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mrb_value mrb_query;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> mrb_query = grn_mrb_value_from_grn_obj(mrb, *p);</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/mrb/scripts/scan_info.rb (+1 -1)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L27">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L28">28</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L29">29</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L30">30</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L31">31</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L32">32</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1L34">34</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R27">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R28">28</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R29">29</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R30">30</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R31">31</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R32">32</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R33">33</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/groonga/commit/3dc3672aedc6f2e518c5d55562d175b00df4772b#L1R34">34</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -28,7 +28,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">module Groonga</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> self.flags |= Flags::ACCESSOR</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> index_info = accessor.find_index(op)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return if index_info.nil?</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if acessor.next</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if accessor.next</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> put_index(accessor, index_info.section_id, 1)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> else</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> put_index(index_info.index, index_info.section_id, 1)</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>