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

Side by Side Diff: src/objects.cc

Issue 42276: Lint... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/runtime.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 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 4172 matching lines...) Expand 10 before | Expand all | Expand 10 after
4183 int len = length(); 4183 int len = length();
4184 if (len != other->length()) return false; 4184 if (len != other->length()) return false;
4185 if (len == 0) return true; 4185 if (len == 0) return true;
4186 4186
4187 // Fast check: if hash code is computed for both strings 4187 // Fast check: if hash code is computed for both strings
4188 // a fast negative check can be performed. 4188 // a fast negative check can be performed.
4189 if (HasHashCode() && other->HasHashCode()) { 4189 if (HasHashCode() && other->HasHashCode()) {
4190 if (Hash() != other->Hash()) return false; 4190 if (Hash() != other->Hash()) return false;
4191 } 4191 }
4192 4192
4193 if (StringShape(this).IsSequentialAscii() && StringShape(other).IsSequentialAs cii()) { 4193 if (StringShape(this).IsSequentialAscii() &&
4194 StringShape(other).IsSequentialAscii()) {
4194 const char* str1 = SeqAsciiString::cast(this)->GetChars(); 4195 const char* str1 = SeqAsciiString::cast(this)->GetChars();
4195 const char* str2 = SeqAsciiString::cast(other)->GetChars(); 4196 const char* str2 = SeqAsciiString::cast(other)->GetChars();
4196 return CompareRawStringContents(Vector<const char>(str1, len), 4197 return CompareRawStringContents(Vector<const char>(str1, len),
4197 Vector<const char>(str2, len)); 4198 Vector<const char>(str2, len));
4198 } 4199 }
4199 4200
4200 if (this->IsFlat()) { 4201 if (this->IsFlat()) {
4201 if (StringShape(this).IsAsciiRepresentation()) { 4202 if (StringShape(this).IsAsciiRepresentation()) {
4202 Vector<const char> vec1 = this->ToAsciiVector(); 4203 Vector<const char> vec1 = this->ToAsciiVector();
4203 if (other->IsFlat()) { 4204 if (other->IsFlat()) {
(...skipping 3159 matching lines...) Expand 10 before | Expand all | Expand 10 after
7363 // No break point. 7364 // No break point.
7364 if (break_point_objects()->IsUndefined()) return 0; 7365 if (break_point_objects()->IsUndefined()) return 0;
7365 // Single beak point. 7366 // Single beak point.
7366 if (!break_point_objects()->IsFixedArray()) return 1; 7367 if (!break_point_objects()->IsFixedArray()) return 1;
7367 // Multiple break points. 7368 // Multiple break points.
7368 return FixedArray::cast(break_point_objects())->length(); 7369 return FixedArray::cast(break_point_objects())->length();
7369 } 7370 }
7370 7371
7371 7372
7372 } } // namespace v8::internal 7373 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698