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

Side by Side Diff: src/ia32/ic-ia32.cc

Issue 524059: Speed up compares with characters ie single-character strings.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/virtual-frame-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // Is it a string? 306 // Is it a string?
307 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx); 307 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, edx);
308 __ j(above_equal, &slow); 308 __ j(above_equal, &slow);
309 // Is the string an array index, with cached numeric value? 309 // Is the string an array index, with cached numeric value?
310 __ mov(ebx, FieldOperand(eax, String::kHashFieldOffset)); 310 __ mov(ebx, FieldOperand(eax, String::kHashFieldOffset));
311 __ test(ebx, Immediate(String::kIsArrayIndexMask)); 311 __ test(ebx, Immediate(String::kIsArrayIndexMask));
312 __ j(not_zero, &index_string, not_taken); 312 __ j(not_zero, &index_string, not_taken);
313 313
314 // Is the string a symbol? 314 // Is the string a symbol?
315 __ movzx_b(ebx, FieldOperand(edx, Map::kInstanceTypeOffset)); 315 __ movzx_b(ebx, FieldOperand(edx, Map::kInstanceTypeOffset));
316 ASSERT(kSymbolTag != 0);
316 __ test(ebx, Immediate(kIsSymbolMask)); 317 __ test(ebx, Immediate(kIsSymbolMask));
317 __ j(zero, &slow, not_taken); 318 __ j(zero, &slow, not_taken);
318 319
319 // If the receiver is a fast-case object, check the keyed lookup 320 // If the receiver is a fast-case object, check the keyed lookup
320 // cache. Otherwise probe the dictionary leaving result in ecx. 321 // cache. Otherwise probe the dictionary leaving result in ecx.
321 __ mov(ebx, FieldOperand(ecx, JSObject::kPropertiesOffset)); 322 __ mov(ebx, FieldOperand(ecx, JSObject::kPropertiesOffset));
322 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), 323 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset),
323 Immediate(Factory::hash_table_map())); 324 Immediate(Factory::hash_table_map()));
324 __ j(equal, &probe_dictionary); 325 __ j(equal, &probe_dictionary);
325 326
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 1482
1482 // Do tail-call to runtime routine. 1483 // Do tail-call to runtime routine.
1483 __ TailCallRuntime( 1484 __ TailCallRuntime(
1484 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); 1485 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1);
1485 } 1486 }
1486 1487
1487 #undef __ 1488 #undef __
1488 1489
1489 1490
1490 } } // namespace v8::internal 1491 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/virtual-frame-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698