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

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

Issue 527031: Fix Windows build. (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 | « no previous file | no next file » | 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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 Label comparison; 2201 Label comparison;
2202 // If the length is 0 then our subtraction gave -1 which compares less 2202 // If the length is 0 then our subtraction gave -1 which compares less
2203 // than any character. 2203 // than any character.
2204 __ j(negative, &comparison); 2204 __ j(negative, &comparison);
2205 // Otherwise load the first character. 2205 // Otherwise load the first character.
2206 __ movzx_b(temp2.reg(), 2206 __ movzx_b(temp2.reg(),
2207 FieldOperand(left_side.reg(), SeqAsciiString::kHeaderSize)); 2207 FieldOperand(left_side.reg(), SeqAsciiString::kHeaderSize));
2208 __ bind(&comparison); 2208 __ bind(&comparison);
2209 // Compare the first character of the string with out constant 2209 // Compare the first character of the string with out constant
2210 // 1-character string. 2210 // 1-character string.
2211 __ cmp(Operand(temp2.reg()), 2211 uint8_t char_value =
2212 Immediate(String::cast(*right_side.handle())->Get(0))); 2212 static_cast<uint8_t>(String::cast(*right_side.handle())->Get(0));
2213 __ cmp(Operand(temp2.reg()), Immediate(char_value));
2213 Label characters_were_different; 2214 Label characters_were_different;
2214 __ j(not_equal, &characters_were_different); 2215 __ j(not_equal, &characters_were_different);
2215 // If the first character is the same then the long string sorts after 2216 // If the first character is the same then the long string sorts after
2216 // the short one. 2217 // the short one.
2217 __ cmp(FieldOperand(left_side.reg(), String::kLengthOffset), 2218 __ cmp(FieldOperand(left_side.reg(), String::kLengthOffset),
2218 Immediate(1)); 2219 Immediate(1));
2219 __ bind(&characters_were_different); 2220 __ bind(&characters_were_different);
2220 } 2221 }
2221 temp2.Unuse(); 2222 temp2.Unuse();
2222 left_side.Unuse(); 2223 left_side.Unuse();
(...skipping 7352 matching lines...) Expand 10 before | Expand all | Expand 10 after
9575 __ ret(3 * kPointerSize); 9576 __ ret(3 * kPointerSize);
9576 9577
9577 // Just jump to runtime to create the sub string. 9578 // Just jump to runtime to create the sub string.
9578 __ bind(&runtime); 9579 __ bind(&runtime);
9579 __ TailCallRuntime(ExternalReference(Runtime::kSubString), 3, 1); 9580 __ TailCallRuntime(ExternalReference(Runtime::kSubString), 3, 1);
9580 } 9581 }
9581 9582
9582 #undef __ 9583 #undef __
9583 9584
9584 } } // namespace v8::internal 9585 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698