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

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

Issue 11318018: - Represent strings internally in UTF-16 format, this makes it (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 381
382 382
383 RawTwoByteString* SnapshotReader::NewTwoByteString(intptr_t len) { 383 RawTwoByteString* SnapshotReader::NewTwoByteString(intptr_t len) {
384 ALLOC_NEW_OBJECT_WITH_LEN(TwoByteString, 384 ALLOC_NEW_OBJECT_WITH_LEN(TwoByteString,
385 object_store()->two_byte_string_class(), 385 object_store()->two_byte_string_class(),
386 len); 386 len);
387 } 387 }
388 388
389 389
390 RawFourByteString* SnapshotReader::NewFourByteString(intptr_t len) {
391 ALLOC_NEW_OBJECT_WITH_LEN(FourByteString,
392 object_store()->four_byte_string_class(),
393 len);
394 }
395
396
397 RawTypeArguments* SnapshotReader::NewTypeArguments(intptr_t len) { 390 RawTypeArguments* SnapshotReader::NewTypeArguments(intptr_t len) {
398 ALLOC_NEW_OBJECT_WITH_LEN(TypeArguments, 391 ALLOC_NEW_OBJECT_WITH_LEN(TypeArguments,
399 Object::type_arguments_class(), 392 Object::type_arguments_class(),
400 len); 393 len);
401 } 394 }
402 395
403 396
404 RawTokenStream* SnapshotReader::NewTokenStream(intptr_t len) { 397 RawTokenStream* SnapshotReader::NewTokenStream(intptr_t len) {
405 ASSERT(kind_ == Snapshot::kFull); 398 ASSERT(kind_ == Snapshot::kFull);
406 ASSERT(isolate()->no_gc_scope_depth() != 0); 399 ASSERT(isolate()->no_gc_scope_depth() != 0);
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 1170
1178 1171
1179 void MessageWriter::WriteMessage(const Object& obj) { 1172 void MessageWriter::WriteMessage(const Object& obj) {
1180 ASSERT(kind() == Snapshot::kMessage); 1173 ASSERT(kind() == Snapshot::kMessage);
1181 WriteObject(obj.raw()); 1174 WriteObject(obj.raw());
1182 UnmarkAll(); 1175 UnmarkAll();
1183 } 1176 }
1184 1177
1185 1178
1186 } // namespace dart 1179 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698