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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 11818025: Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ARM fix Created 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 6445 matching lines...) Expand 10 before | Expand all | Expand 10 after
6456 __ j(zero, &compare_lengths, Label::kNear); 6456 __ j(zero, &compare_lengths, Label::kNear);
6457 6457
6458 // Compare characters. 6458 // Compare characters.
6459 Label result_not_equal; 6459 Label result_not_equal;
6460 GenerateAsciiCharsCompareLoop(masm, left, right, min_length, scratch2, 6460 GenerateAsciiCharsCompareLoop(masm, left, right, min_length, scratch2,
6461 &result_not_equal, Label::kNear); 6461 &result_not_equal, Label::kNear);
6462 6462
6463 // Compare lengths - strings up to min-length are equal. 6463 // Compare lengths - strings up to min-length are equal.
6464 __ bind(&compare_lengths); 6464 __ bind(&compare_lengths);
6465 __ test(length_delta, length_delta); 6465 __ test(length_delta, length_delta);
6466 #ifndef ENABLE_LATIN_1
6466 __ j(not_zero, &result_not_equal, Label::kNear); 6467 __ j(not_zero, &result_not_equal, Label::kNear);
6468 #else
6469 Label length_not_equal;
6470 __ j(not_zero, &length_not_equal, Label::kNear);
6471 #endif
6467 6472
6468 // Result is EQUAL. 6473 // Result is EQUAL.
6469 STATIC_ASSERT(EQUAL == 0); 6474 STATIC_ASSERT(EQUAL == 0);
6470 STATIC_ASSERT(kSmiTag == 0); 6475 STATIC_ASSERT(kSmiTag == 0);
6471 __ Set(eax, Immediate(Smi::FromInt(EQUAL))); 6476 __ Set(eax, Immediate(Smi::FromInt(EQUAL)));
6472 __ ret(0); 6477 __ ret(0);
6473 6478
6474 Label result_greater; 6479 Label result_greater;
6480 #ifdef ENABLE_LATIN_1
6481 Label result_less;
6482 __ bind(&length_not_equal);
6483 __ j(greater, &result_greater, Label::kNear);
6484 __ jmp(&result_less, Label::kNear);
6485 #endif
6475 __ bind(&result_not_equal); 6486 __ bind(&result_not_equal);
6487 #ifndef ENABLE_LATIN_1
6476 __ j(greater, &result_greater, Label::kNear); 6488 __ j(greater, &result_greater, Label::kNear);
6489 #else
6490 __ j(above, &result_greater, Label::kNear);
6491 __ bind(&result_less);
6492 #endif
6477 6493
6478 // Result is LESS. 6494 // Result is LESS.
6479 __ Set(eax, Immediate(Smi::FromInt(LESS))); 6495 __ Set(eax, Immediate(Smi::FromInt(LESS)));
6480 __ ret(0); 6496 __ ret(0);
6481 6497
6482 // Result is GREATER. 6498 // Result is GREATER.
6483 __ bind(&result_greater); 6499 __ bind(&result_greater);
6484 __ Set(eax, Immediate(Smi::FromInt(GREATER))); 6500 __ Set(eax, Immediate(Smi::FromInt(GREATER)));
6485 __ ret(0); 6501 __ ret(0);
6486 } 6502 }
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
7505 // Restore ecx. 7521 // Restore ecx.
7506 __ pop(ecx); 7522 __ pop(ecx);
7507 __ ret(0); 7523 __ ret(0);
7508 } 7524 }
7509 7525
7510 #undef __ 7526 #undef __
7511 7527
7512 } } // namespace v8::internal 7528 } } // namespace v8::internal
7513 7529
7514 #endif // V8_TARGET_ARCH_IA32 7530 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/ia32/regexp-macro-assembler-ia32.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698