Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: src/ia32/ic-ia32.cc

Issue 6932010: Unroll more StringDictionary lookup probes both for positive and negative dictionary lookups. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: revive inlined portions Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ia32/ic-ia32.cc
diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc
index 4106f0108903bde9f0cb9cef50f06bbb671ee3c2..2cee8b11696afe6039cdbd82cf5fdf4993e4b372 100644
--- a/src/ia32/ic-ia32.cc
+++ b/src/ia32/ic-ia32.cc
@@ -140,14 +140,26 @@ static void GenerateStringDictionaryProbes(MacroAssembler* masm,
__ lea(r0, Operand(r0, r0, times_2, 0)); // r0 = r0 * 3
// Check if the key is identical to the name.
- __ cmp(name, Operand(elements, r0, times_4,
+ __ cmp(name, Operand(elements,
+ r0,
+ times_4,
kElementsStartOffset - kHeapObjectTag));
- if (i != kProbes - 1) {
- __ j(equal, done, taken);
- } else {
- __ j(not_equal, miss, not_taken);
- }
+ __ j(equal, done, taken);
}
+
+ StringDictionaryLookupStub stub(elements,
+ r1,
+ r0,
+ StringDictionaryLookupStub::POSITIVE_LOOKUP);
+ __ push(name);
+ __ mov(r0, FieldOperand(name, String::kHashFieldOffset));
+ __ shr(r0, String::kHashShift);
+ __ push(r0);
+ __ CallStub(&stub);
+
+ __ test(r1, Operand(r1));
+ __ j(zero, miss);
+ __ jmp(done);
}

Powered by Google App Engine
This is Rietveld 408576698