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

Side by Side Diff: runtime/vm/object.cc

Issue 10874043: Missing file from last commit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/lib/string.cc ('k') | 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 9249 matching lines...) Expand 10 before | Expand all | Expand 10 after
9260 } 9260 }
9261 9261
9262 9262
9263 RawString* String::SubString(const String& str, 9263 RawString* String::SubString(const String& str,
9264 intptr_t begin_index, 9264 intptr_t begin_index,
9265 intptr_t length, 9265 intptr_t length,
9266 Heap::Space space) { 9266 Heap::Space space) {
9267 ASSERT(!str.IsNull()); 9267 ASSERT(!str.IsNull());
9268 ASSERT(begin_index >= 0); 9268 ASSERT(begin_index >= 0);
9269 ASSERT(length >= 0); 9269 ASSERT(length >= 0);
9270 if (begin_index >= str.Length()) { 9270 if (begin_index <= str.Length() && length == 0) {
9271 return Symbols::Empty();
9272 }
9273 if (begin_index > str.Length()) {
9271 return String::null(); 9274 return String::null();
9272 } 9275 }
9273 String& result = String::Handle(); 9276 String& result = String::Handle();
9274 bool is_one_byte_string = true; 9277 bool is_one_byte_string = true;
9275 bool is_two_byte_string = true; 9278 bool is_two_byte_string = true;
9276 intptr_t char_size = str.CharSize(); 9279 intptr_t char_size = str.CharSize();
9277 if (char_size == kTwoByteChar) { 9280 if (char_size == kTwoByteChar) {
9278 for (intptr_t i = begin_index; i < begin_index + length; ++i) { 9281 for (intptr_t i = begin_index; i < begin_index + length; ++i) {
9279 if (str.CharAt(i) > 0xFF) { 9282 if (str.CharAt(i) > 0xFF) {
9280 is_one_byte_string = false; 9283 is_one_byte_string = false;
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
11173 } 11176 }
11174 return result.raw(); 11177 return result.raw();
11175 } 11178 }
11176 11179
11177 11180
11178 const char* WeakProperty::ToCString() const { 11181 const char* WeakProperty::ToCString() const {
11179 return "_WeakProperty"; 11182 return "_WeakProperty";
11180 } 11183 }
11181 11184
11182 } // namespace dart 11185 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698