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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 7971009: Add kHeaderSize constant to SeqString. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Lasse Reichstein. 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 | « no previous file | src/mips/code-stubs-mips.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 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 4557 matching lines...) Expand 10 before | Expand all | Expand 10 after
4568 __ add(r0, r0, Operand(r2)); 4568 __ add(r0, r0, Operand(r2));
4569 __ str(r0, MemOperand(sp, 2 * kPointerSize)); 4569 __ str(r0, MemOperand(sp, 2 * kPointerSize));
4570 4570
4571 // Argument 5 (sp[4]): static offsets vector buffer. 4571 // Argument 5 (sp[4]): static offsets vector buffer.
4572 __ mov(r0, 4572 __ mov(r0,
4573 Operand(ExternalReference::address_of_static_offsets_vector(isolate))); 4573 Operand(ExternalReference::address_of_static_offsets_vector(isolate)));
4574 __ str(r0, MemOperand(sp, 1 * kPointerSize)); 4574 __ str(r0, MemOperand(sp, 1 * kPointerSize));
4575 4575
4576 // For arguments 4 and 3 get string length, calculate start of string data and 4576 // For arguments 4 and 3 get string length, calculate start of string data and
4577 // calculate the shift of the index (0 for ASCII and 1 for two byte). 4577 // calculate the shift of the index (0 for ASCII and 1 for two byte).
4578 STATIC_ASSERT(SeqAsciiString::kHeaderSize == SeqTwoByteString::kHeaderSize); 4578 __ add(r8, subject, Operand(SeqString::kHeaderSize - kHeapObjectTag));
4579 __ add(r8, subject, Operand(SeqAsciiString::kHeaderSize - kHeapObjectTag));
4580 __ eor(r3, r3, Operand(1)); 4579 __ eor(r3, r3, Operand(1));
4581 // Load the length from the original subject string from the previous stack 4580 // Load the length from the original subject string from the previous stack
4582 // frame. Therefore we have to use fp, which points exactly to two pointer 4581 // frame. Therefore we have to use fp, which points exactly to two pointer
4583 // sizes below the previous sp. (Because creating a new stack frame pushes 4582 // sizes below the previous sp. (Because creating a new stack frame pushes
4584 // the previous fp onto the stack and moves up sp by 2 * kPointerSize.) 4583 // the previous fp onto the stack and moves up sp by 2 * kPointerSize.)
4585 __ ldr(subject, MemOperand(fp, kSubjectOffset + 2 * kPointerSize)); 4584 __ ldr(subject, MemOperand(fp, kSubjectOffset + 2 * kPointerSize));
4586 // If slice offset is not 0, load the length from the original sliced string. 4585 // If slice offset is not 0, load the length from the original sliced string.
4587 // Argument 4, r3: End of string data 4586 // Argument 4, r3: End of string data
4588 // Argument 3, r2: Start of string data 4587 // Argument 3, r2: Start of string data
4589 // Prepare start and end index of the input. 4588 // Prepare start and end index of the input.
(...skipping 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
7065 7064
7066 // Fall through when we need to inform the incremental marker. 7065 // Fall through when we need to inform the incremental marker.
7067 } 7066 }
7068 7067
7069 7068
7070 #undef __ 7069 #undef __
7071 7070
7072 } } // namespace v8::internal 7071 } } // namespace v8::internal
7073 7072
7074 #endif // V8_TARGET_ARCH_ARM 7073 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698