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

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

Issue 7776007: Small fix for STATIC_ASSERT. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/checks.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 4371 matching lines...) Expand 10 before | Expand all | Expand 10 after
4382 4382
4383 // subject: Subject string 4383 // subject: Subject string
4384 // regexp_data: RegExp data (FixedArray) 4384 // regexp_data: RegExp data (FixedArray)
4385 // Check for flat cons string or sliced string. 4385 // Check for flat cons string or sliced string.
4386 // A flat cons string is a cons string where the second part is the empty 4386 // A flat cons string is a cons string where the second part is the empty
4387 // string. In that case the subject string is just the first part of the cons 4387 // string. In that case the subject string is just the first part of the cons
4388 // string. Also in this case the first part of the cons string is known to be 4388 // string. Also in this case the first part of the cons string is known to be
4389 // a sequential string or an external string. 4389 // a sequential string or an external string.
4390 // In the case of a sliced string its offset has to be taken into account. 4390 // In the case of a sliced string its offset has to be taken into account.
4391 Label cons_string, check_encoding; 4391 Label cons_string, check_encoding;
4392 STATIC_ASSERT((kConsStringTag < kExternalStringTag)); 4392 STATIC_ASSERT(kConsStringTag < kExternalStringTag);
4393 STATIC_ASSERT((kSlicedStringTag > kExternalStringTag)); 4393 STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
4394 __ cmp(r1, Operand(kExternalStringTag)); 4394 __ cmp(r1, Operand(kExternalStringTag));
4395 __ b(lt, &cons_string); 4395 __ b(lt, &cons_string);
4396 __ b(eq, &runtime); 4396 __ b(eq, &runtime);
4397 4397
4398 // String is sliced. 4398 // String is sliced.
4399 __ ldr(r9, FieldMemOperand(subject, SlicedString::kOffsetOffset)); 4399 __ ldr(r9, FieldMemOperand(subject, SlicedString::kOffsetOffset));
4400 __ mov(r9, Operand(r9, ASR, kSmiTagSize)); 4400 __ mov(r9, Operand(r9, ASR, kSmiTagSize));
4401 __ ldr(subject, FieldMemOperand(subject, SlicedString::kParentOffset)); 4401 __ ldr(subject, FieldMemOperand(subject, SlicedString::kParentOffset));
4402 // r9: offset of sliced string, smi-tagged. 4402 // r9: offset of sliced string, smi-tagged.
4403 __ jmp(&check_encoding); 4403 __ jmp(&check_encoding);
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
4850 __ cmp(ip, Operand(scratch_)); 4850 __ cmp(ip, Operand(scratch_));
4851 __ b(ls, index_out_of_range_); 4851 __ b(ls, index_out_of_range_);
4852 4852
4853 // We need special handling for non-flat strings. 4853 // We need special handling for non-flat strings.
4854 STATIC_ASSERT(kSeqStringTag == 0); 4854 STATIC_ASSERT(kSeqStringTag == 0);
4855 __ tst(result_, Operand(kStringRepresentationMask)); 4855 __ tst(result_, Operand(kStringRepresentationMask));
4856 __ b(eq, &flat_string); 4856 __ b(eq, &flat_string);
4857 4857
4858 // Handle non-flat strings. 4858 // Handle non-flat strings.
4859 __ and_(result_, result_, Operand(kStringRepresentationMask)); 4859 __ and_(result_, result_, Operand(kStringRepresentationMask));
4860 STATIC_ASSERT((kConsStringTag < kExternalStringTag)); 4860 STATIC_ASSERT(kConsStringTag < kExternalStringTag);
4861 STATIC_ASSERT((kSlicedStringTag > kExternalStringTag)); 4861 STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
4862 __ cmp(result_, Operand(kExternalStringTag)); 4862 __ cmp(result_, Operand(kExternalStringTag));
4863 __ b(gt, &sliced_string); 4863 __ b(gt, &sliced_string);
4864 __ b(eq, &call_runtime_); 4864 __ b(eq, &call_runtime_);
4865 4865
4866 // ConsString. 4866 // ConsString.
4867 // Check whether the right hand side is the empty string (i.e. if 4867 // Check whether the right hand side is the empty string (i.e. if
4868 // this is really a flat string in a cons string). If that is not 4868 // this is really a flat string in a cons string). If that is not
4869 // the case we would rather go to the runtime system now to flatten 4869 // the case we would rather go to the runtime system now to flatten
4870 // the string. 4870 // the string.
4871 Label assure_seq_string; 4871 Label assure_seq_string;
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
6610 __ mov(result, Operand::Zero()); 6610 __ mov(result, Operand::Zero());
6611 __ Ret(); 6611 __ Ret();
6612 } 6612 }
6613 6613
6614 6614
6615 #undef __ 6615 #undef __
6616 6616
6617 } } // namespace v8::internal 6617 } } // namespace v8::internal
6618 6618
6619 #endif // V8_TARGET_ARCH_ARM 6619 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/checks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698