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/mips/macro-assembler-mips.cc

Issue 11293168: Rename kAsciiStringTag to kOneByteStringTag (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/mips/code-stubs-mips.cc ('k') | src/objects.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 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 5254 matching lines...) Expand 10 before | Expand all | Expand 10 after
5265 Branch(&skip, eq, t8, Operand(zero_reg)); 5265 Branch(&skip, eq, t8, Operand(zero_reg));
5266 li(length, ExternalString::kSize); 5266 li(length, ExternalString::kSize);
5267 Branch(&is_data_object); 5267 Branch(&is_data_object);
5268 bind(&skip); 5268 bind(&skip);
5269 } 5269 }
5270 5270
5271 // Sequential string, either ASCII or UC16. 5271 // Sequential string, either ASCII or UC16.
5272 // For ASCII (char-size of 1) we shift the smi tag away to get the length. 5272 // For ASCII (char-size of 1) we shift the smi tag away to get the length.
5273 // For UC16 (char-size of 2) we just leave the smi tag in place, thereby 5273 // For UC16 (char-size of 2) we just leave the smi tag in place, thereby
5274 // getting the length multiplied by 2. 5274 // getting the length multiplied by 2.
5275 ASSERT(kAsciiStringTag == 4 && kStringEncodingMask == 4); 5275 ASSERT(kOneByteStringTag == 4 && kStringEncodingMask == 4);
5276 ASSERT(kSmiTag == 0 && kSmiTagSize == 1); 5276 ASSERT(kSmiTag == 0 && kSmiTagSize == 1);
5277 lw(t9, FieldMemOperand(value, String::kLengthOffset)); 5277 lw(t9, FieldMemOperand(value, String::kLengthOffset));
5278 And(t8, instance_type, Operand(kStringEncodingMask)); 5278 And(t8, instance_type, Operand(kStringEncodingMask));
5279 { 5279 {
5280 Label skip; 5280 Label skip;
5281 Branch(&skip, eq, t8, Operand(zero_reg)); 5281 Branch(&skip, eq, t8, Operand(zero_reg));
5282 srl(t9, t9, 1); 5282 srl(t9, t9, 1);
5283 bind(&skip); 5283 bind(&skip);
5284 } 5284 }
5285 Addu(length, t9, Operand(SeqString::kHeaderSize + kObjectAlignmentMask)); 5285 Addu(length, t9, Operand(SeqString::kHeaderSize + kObjectAlignmentMask));
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
5458 opcode == BGTZL); 5458 opcode == BGTZL);
5459 opcode = (cond == eq) ? BEQ : BNE; 5459 opcode = (cond == eq) ? BEQ : BNE;
5460 instr = (instr & ~kOpcodeMask) | opcode; 5460 instr = (instr & ~kOpcodeMask) | opcode;
5461 masm_.emit(instr); 5461 masm_.emit(instr);
5462 } 5462 }
5463 5463
5464 5464
5465 } } // namespace v8::internal 5465 } } // namespace v8::internal
5466 5466
5467 #endif // V8_TARGET_ARCH_MIPS 5467 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698