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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 7795018: Generated code for substring slices in x64 and arm. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Applied Bill's suggestions. Created 9 years, 3 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/arm/code-stubs-arm.cc ('k') | src/arm/macro-assembler-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3491 matching lines...) Expand 10 before | Expand all | Expand 10 after
3502 3502
3503 // Check whether the string is sequential. The only non-sequential 3503 // Check whether the string is sequential. The only non-sequential
3504 // shapes we support have just been unwrapped above. 3504 // shapes we support have just been unwrapped above.
3505 __ bind(&check_sequential); 3505 __ bind(&check_sequential);
3506 STATIC_ASSERT(kSeqStringTag == 0); 3506 STATIC_ASSERT(kSeqStringTag == 0);
3507 __ tst(result, Operand(kStringRepresentationMask)); 3507 __ tst(result, Operand(kStringRepresentationMask));
3508 __ b(ne, deferred->entry()); 3508 __ b(ne, deferred->entry());
3509 3509
3510 // Dispatch on the encoding: ASCII or two-byte. 3510 // Dispatch on the encoding: ASCII or two-byte.
3511 Label ascii_string; 3511 Label ascii_string;
3512 STATIC_ASSERT(kAsciiStringTag != 0); 3512 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0);
3513 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0);
3513 __ tst(result, Operand(kStringEncodingMask)); 3514 __ tst(result, Operand(kStringEncodingMask));
3514 __ b(ne, &ascii_string); 3515 __ b(ne, &ascii_string);
3515 3516
3516 // Two-byte string. 3517 // Two-byte string.
3517 // Load the two-byte character code into the result register. 3518 // Load the two-byte character code into the result register.
3518 Label done; 3519 Label done;
3519 __ add(result, 3520 __ add(result,
3520 string, 3521 string,
3521 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag)); 3522 Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag));
3522 __ ldrh(result, MemOperand(result, index, LSL, 1)); 3523 __ ldrh(result, MemOperand(result, index, LSL, 1));
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
4508 ASSERT(osr_pc_offset_ == -1); 4509 ASSERT(osr_pc_offset_ == -1);
4509 osr_pc_offset_ = masm()->pc_offset(); 4510 osr_pc_offset_ = masm()->pc_offset();
4510 } 4511 }
4511 4512
4512 4513
4513 4514
4514 4515
4515 #undef __ 4516 #undef __
4516 4517
4517 } } // namespace v8::internal 4518 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698