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

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

Issue 8510005: Simplify StringCharCodeAt in non-crankshaft codegen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
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 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after
3640 __ b(ne, deferred->entry()); 3640 __ b(ne, deferred->entry());
3641 // Get the first of the two strings and load its instance type. 3641 // Get the first of the two strings and load its instance type.
3642 __ ldr(string, FieldMemOperand(string, ConsString::kFirstOffset)); 3642 __ ldr(string, FieldMemOperand(string, ConsString::kFirstOffset));
3643 3643
3644 __ bind(&indirect_string_loaded); 3644 __ bind(&indirect_string_loaded);
3645 __ ldr(result, FieldMemOperand(string, HeapObject::kMapOffset)); 3645 __ ldr(result, FieldMemOperand(string, HeapObject::kMapOffset));
3646 __ ldrb(result, FieldMemOperand(result, Map::kInstanceTypeOffset)); 3646 __ ldrb(result, FieldMemOperand(result, Map::kInstanceTypeOffset));
3647 3647
3648 // Check whether the string is sequential. The only non-sequential 3648 // Check whether the string is sequential. The only non-sequential
3649 // shapes we support have just been unwrapped above. 3649 // shapes we support have just been unwrapped above.
3650 // Note that if the original string is a cons or slice with an external
3651 // string as underlying string, we pass that unpacked underlying string with
3652 // the updated index to the runtime function.
3650 __ bind(&check_sequential); 3653 __ bind(&check_sequential);
3651 STATIC_ASSERT(kSeqStringTag == 0); 3654 STATIC_ASSERT(kSeqStringTag == 0);
3652 __ tst(result, Operand(kStringRepresentationMask)); 3655 __ tst(result, Operand(kStringRepresentationMask));
3653 __ b(ne, deferred->entry()); 3656 __ b(ne, deferred->entry());
3654 3657
3655 // Dispatch on the encoding: ASCII or two-byte. 3658 // Dispatch on the encoding: ASCII or two-byte.
3656 Label ascii_string; 3659 Label ascii_string;
3657 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0); 3660 STATIC_ASSERT((kStringEncodingMask & kAsciiStringTag) != 0);
3658 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0); 3661 STATIC_ASSERT((kStringEncodingMask & kTwoByteStringTag) == 0);
3659 __ tst(result, Operand(kStringEncodingMask)); 3662 __ tst(result, Operand(kStringEncodingMask));
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
4665 ASSERT(osr_pc_offset_ == -1); 4668 ASSERT(osr_pc_offset_ == -1);
4666 osr_pc_offset_ = masm()->pc_offset(); 4669 osr_pc_offset_ = masm()->pc_offset();
4667 } 4670 }
4668 4671
4669 4672
4670 4673
4671 4674
4672 #undef __ 4675 #undef __
4673 4676
4674 } } // namespace v8::internal 4677 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | src/ia32/code-stubs-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698