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

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 11411005: Rename SeqAsciiString (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/x64/full-codegen-x64.cc ('k') | test/cctest/test-heap.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 3947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3958 3958
3959 3959
3960 void MacroAssembler::AllocateAsciiString(Register result, 3960 void MacroAssembler::AllocateAsciiString(Register result,
3961 Register length, 3961 Register length,
3962 Register scratch1, 3962 Register scratch1,
3963 Register scratch2, 3963 Register scratch2,
3964 Register scratch3, 3964 Register scratch3,
3965 Label* gc_required) { 3965 Label* gc_required) {
3966 // Calculate the number of bytes needed for the characters in the string while 3966 // Calculate the number of bytes needed for the characters in the string while
3967 // observing object alignment. 3967 // observing object alignment.
3968 const int kHeaderAlignment = SeqAsciiString::kHeaderSize & 3968 const int kHeaderAlignment = SeqOneByteString::kHeaderSize &
3969 kObjectAlignmentMask; 3969 kObjectAlignmentMask;
3970 movl(scratch1, length); 3970 movl(scratch1, length);
3971 ASSERT(kCharSize == 1); 3971 ASSERT(kCharSize == 1);
3972 addq(scratch1, Immediate(kObjectAlignmentMask + kHeaderAlignment)); 3972 addq(scratch1, Immediate(kObjectAlignmentMask + kHeaderAlignment));
3973 and_(scratch1, Immediate(~kObjectAlignmentMask)); 3973 and_(scratch1, Immediate(~kObjectAlignmentMask));
3974 if (kHeaderAlignment > 0) { 3974 if (kHeaderAlignment > 0) {
3975 subq(scratch1, Immediate(kHeaderAlignment)); 3975 subq(scratch1, Immediate(kHeaderAlignment));
3976 } 3976 }
3977 3977
3978 // Allocate ASCII string in new space. 3978 // Allocate ASCII string in new space.
3979 AllocateInNewSpace(SeqAsciiString::kHeaderSize, 3979 AllocateInNewSpace(SeqOneByteString::kHeaderSize,
3980 times_1, 3980 times_1,
3981 scratch1, 3981 scratch1,
3982 result, 3982 result,
3983 scratch2, 3983 scratch2,
3984 scratch3, 3984 scratch3,
3985 gc_required, 3985 gc_required,
3986 TAG_OBJECT); 3986 TAG_OBJECT);
3987 3987
3988 // Set the map, length and hash field. 3988 // Set the map, length and hash field.
3989 LoadRoot(kScratchRegister, Heap::kAsciiStringMapRootIndex); 3989 LoadRoot(kScratchRegister, Heap::kAsciiStringMapRootIndex);
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
4568 4568
4569 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset)); 4569 movq(rcx, FieldOperand(rbx, Map::kPrototypeOffset));
4570 cmpq(rcx, null_value); 4570 cmpq(rcx, null_value);
4571 j(not_equal, &next); 4571 j(not_equal, &next);
4572 } 4572 }
4573 4573
4574 4574
4575 } } // namespace v8::internal 4575 } } // namespace v8::internal
4576 4576
4577 #endif // V8_TARGET_ARCH_X64 4577 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698