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

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

Issue 11360251: Make kAsciiDataHintTag have correct semantics for all both 1 and 2 byte string types. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('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 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 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after
3602 // Live registers: 3602 // Live registers:
3603 // string_length: Sum of string lengths, as a smi. 3603 // string_length: Sum of string lengths, as a smi.
3604 // elements: FixedArray of strings. 3604 // elements: FixedArray of strings.
3605 3605
3606 // Check that the separator is a flat ASCII string. 3606 // Check that the separator is a flat ASCII string.
3607 __ mov(string, separator_operand); 3607 __ mov(string, separator_operand);
3608 __ JumpIfSmi(string, &bailout); 3608 __ JumpIfSmi(string, &bailout);
3609 __ mov(scratch, FieldOperand(string, HeapObject::kMapOffset)); 3609 __ mov(scratch, FieldOperand(string, HeapObject::kMapOffset));
3610 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset)); 3610 __ movzx_b(scratch, FieldOperand(scratch, Map::kInstanceTypeOffset));
3611 __ and_(scratch, Immediate( 3611 __ and_(scratch, Immediate(
3612 kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask)); 3612 kIsNotStringMask | kStringEncodingMask | kAsciiDataHintMask |
3613 kStringRepresentationMask));
3613 __ cmp(scratch, ASCII_STRING_TYPE); 3614 __ cmp(scratch, ASCII_STRING_TYPE);
3614 __ j(not_equal, &bailout); 3615 __ j(not_equal, &bailout);
3615 3616
3616 // Add (separator length times array_length) - separator length 3617 // Add (separator length times array_length) - separator length
3617 // to string_length. 3618 // to string_length.
3618 __ mov(scratch, separator_operand); 3619 __ mov(scratch, separator_operand);
3619 __ mov(scratch, FieldOperand(scratch, SeqAsciiString::kLengthOffset)); 3620 __ mov(scratch, FieldOperand(scratch, SeqAsciiString::kLengthOffset));
3620 __ sub(string_length, scratch); // May be negative, temporarily. 3621 __ sub(string_length, scratch); // May be negative, temporarily.
3621 __ imul(scratch, array_length_operand); 3622 __ imul(scratch, array_length_operand);
3622 __ j(overflow, &bailout); 3623 __ j(overflow, &bailout);
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
4519 *stack_depth = 0; 4520 *stack_depth = 0;
4520 *context_length = 0; 4521 *context_length = 0;
4521 return previous_; 4522 return previous_;
4522 } 4523 }
4523 4524
4524 #undef __ 4525 #undef __
4525 4526
4526 } } // namespace v8::internal 4527 } } // namespace v8::internal
4527 4528
4528 #endif // V8_TARGET_ARCH_IA32 4529 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698