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

Side by Side Diff: src/objects.cc

Issue 10298: cl.exe complains about missing parens around the boolean expression. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after
3841 const Char* pa = a.start(); 3841 const Char* pa = a.start();
3842 const Char* pb = b.start(); 3842 const Char* pb = b.start();
3843 int i = 0; 3843 int i = 0;
3844 #ifndef CAN_READ_UNALIGNED 3844 #ifndef CAN_READ_UNALIGNED
3845 // If this architecture isn't comfortable reading unaligned ints 3845 // If this architecture isn't comfortable reading unaligned ints
3846 // then we have to check that the strings are aligned before 3846 // then we have to check that the strings are aligned before
3847 // comparing them blockwise. 3847 // comparing them blockwise.
3848 const int kAlignmentMask = sizeof(uint32_t) - 1; // NOLINT 3848 const int kAlignmentMask = sizeof(uint32_t) - 1; // NOLINT
3849 uint32_t pa_addr = reinterpret_cast<uint32_t>(pa); 3849 uint32_t pa_addr = reinterpret_cast<uint32_t>(pa);
3850 uint32_t pb_addr = reinterpret_cast<uint32_t>(pb); 3850 uint32_t pb_addr = reinterpret_cast<uint32_t>(pb);
3851 if ((pa_addr & kAlignmentMask) | (pb_addr & kAlignmentMask) == 0) { 3851 if (((pa_addr & kAlignmentMask) | (pb_addr & kAlignmentMask)) == 0) {
3852 #endif 3852 #endif
3853 const int kStepSize = sizeof(int) / sizeof(Char); // NOLINT 3853 const int kStepSize = sizeof(int) / sizeof(Char); // NOLINT
3854 int endpoint = length - kStepSize; 3854 int endpoint = length - kStepSize;
3855 // Compare blocks until we reach near the end of the string. 3855 // Compare blocks until we reach near the end of the string.
3856 for (; i <= endpoint; i += kStepSize) { 3856 for (; i <= endpoint; i += kStepSize) {
3857 uint32_t wa = *reinterpret_cast<const uint32_t*>(pa + i); 3857 uint32_t wa = *reinterpret_cast<const uint32_t*>(pa + i);
3858 uint32_t wb = *reinterpret_cast<const uint32_t*>(pb + i); 3858 uint32_t wb = *reinterpret_cast<const uint32_t*>(pb + i);
3859 if (wa != wb) { 3859 if (wa != wb) {
3860 return false; 3860 return false;
3861 } 3861 }
(...skipping 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after
6904 // No break point. 6904 // No break point.
6905 if (break_point_objects()->IsUndefined()) return 0; 6905 if (break_point_objects()->IsUndefined()) return 0;
6906 // Single beak point. 6906 // Single beak point.
6907 if (!break_point_objects()->IsFixedArray()) return 1; 6907 if (!break_point_objects()->IsFixedArray()) return 1;
6908 // Multiple break points. 6908 // Multiple break points.
6909 return FixedArray::cast(break_point_objects())->length(); 6909 return FixedArray::cast(break_point_objects())->length();
6910 } 6910 }
6911 6911
6912 6912
6913 } } // namespace v8::internal 6913 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698