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

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

Issue 23072026: fix cpp11 compile errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/vm/raw_object.cc ('k') | runtime/vm/scanner.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 (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/bigint_operations.h" 5 #include "vm/bigint_operations.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/snapshot.h" 8 #include "vm/snapshot.h"
9 #include "vm/symbols.h" 9 #include "vm/symbols.h"
10 #include "vm/visitor.h" 10 #include "vm/visitor.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 if (FLAG_error_on_malformed_type && 250 if (FLAG_error_on_malformed_type &&
251 (ptr()->type_state_ != RawType::kFinalizedInstantiated) && 251 (ptr()->type_state_ != RawType::kFinalizedInstantiated) &&
252 (ptr()->type_state_ != RawType::kFinalizedUninstantiated)) { 252 (ptr()->type_state_ != RawType::kFinalizedUninstantiated)) {
253 // Print the name of the class of the unfinalized type, as well as the 253 // Print the name of the class of the unfinalized type, as well as the
254 // token location from where it is referred to, making sure not 254 // token location from where it is referred to, making sure not
255 // to allocate any handles. Unfortunately, we cannot print the script name. 255 // to allocate any handles. Unfortunately, we cannot print the script name.
256 const intptr_t cid = ClassIdTag::decode(*reinterpret_cast<uword*>( 256 const intptr_t cid = ClassIdTag::decode(*reinterpret_cast<uword*>(
257 reinterpret_cast<uword>(ptr()->type_class_) - kHeapObjectTag + 257 reinterpret_cast<uword>(ptr()->type_class_) - kHeapObjectTag +
258 Object::tags_offset())); 258 Object::tags_offset()));
259 if (cid == kUnresolvedClassCid) { 259 if (cid == kUnresolvedClassCid) {
260 OS::Print("Snapshotting unresolved type '%s' at token pos %"Pd"\n", 260 OS::Print("Snapshotting unresolved type '%s' at token pos %" Pd "\n",
261 RawOneByteStringToCString( 261 RawOneByteStringToCString(
262 reinterpret_cast<RawOneByteString*>( 262 reinterpret_cast<RawOneByteString*>(
263 reinterpret_cast<RawUnresolvedClass*>( 263 reinterpret_cast<RawUnresolvedClass*>(
264 ptr()->type_class_)->ptr()->ident_)), 264 ptr()->type_class_)->ptr()->ident_)),
265 ptr()->token_pos_); 265 ptr()->token_pos_);
266 } else { 266 } else {
267 // Assume cid == kClassId, but it can also be kIllegalCid. 267 // Assume cid == kClassId, but it can also be kIllegalCid.
268 OS::Print("Snapshotting unfinalized type '%s' at token pos %"Pd"\n", 268 OS::Print("Snapshotting unfinalized type '%s' at token pos %" Pd "\n",
269 RawOneByteStringToCString( 269 RawOneByteStringToCString(
270 reinterpret_cast<RawOneByteString*>( 270 reinterpret_cast<RawOneByteString*>(
271 reinterpret_cast<RawClass*>( 271 reinterpret_cast<RawClass*>(
272 ptr()->type_class_)->ptr()->name_)), 272 ptr()->type_class_)->ptr()->name_)),
273 ptr()->token_pos_); 273 ptr()->token_pos_);
274 } 274 }
275 UNREACHABLE(); 275 UNREACHABLE();
276 } 276 }
277 277
278 // Write out the serialization header value for this object. 278 // Write out the serialization header value for this object.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 // Only finalized type parameters should be written to a snapshot. 336 // Only finalized type parameters should be written to a snapshot.
337 // TODO(regis): Replace the test below by an ASSERT() or remove the flag test. 337 // TODO(regis): Replace the test below by an ASSERT() or remove the flag test.
338 if (FLAG_error_on_malformed_type && 338 if (FLAG_error_on_malformed_type &&
339 (ptr()->type_state_ != RawTypeParameter::kFinalizedUninstantiated)) { 339 (ptr()->type_state_ != RawTypeParameter::kFinalizedUninstantiated)) {
340 // Print the name of the unfinalized type parameter, the name of the class 340 // Print the name of the unfinalized type parameter, the name of the class
341 // it parameterizes, as well as the token location from where it is referred 341 // it parameterizes, as well as the token location from where it is referred
342 // to, making sure not to allocate any handles. Unfortunately, we cannot 342 // to, making sure not to allocate any handles. Unfortunately, we cannot
343 // print the script name. 343 // print the script name.
344 OS::Print("Snapshotting unfinalized type parameter '%s' of class '%s' at " 344 OS::Print("Snapshotting unfinalized type parameter '%s' of class '%s' at "
345 "token pos %"Pd"\n", 345 "token pos %" Pd "\n",
346 RawOneByteStringToCString( 346 RawOneByteStringToCString(
347 reinterpret_cast<RawOneByteString*>(ptr()->name_)), 347 reinterpret_cast<RawOneByteString*>(ptr()->name_)),
348 RawOneByteStringToCString( 348 RawOneByteStringToCString(
349 reinterpret_cast<RawOneByteString*>( 349 reinterpret_cast<RawOneByteString*>(
350 reinterpret_cast<RawClass*>( 350 reinterpret_cast<RawClass*>(
351 ptr()->parameterized_class_)->ptr()->name_)), 351 ptr()->parameterized_class_)->ptr()->name_)),
352 ptr()->token_pos_); 352 ptr()->token_pos_);
353 UNREACHABLE(); 353 UNREACHABLE();
354 } 354 }
355 355
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 } 2642 }
2643 2643
2644 2644
2645 void RawMirrorReference::WriteTo(SnapshotWriter* writer, 2645 void RawMirrorReference::WriteTo(SnapshotWriter* writer,
2646 intptr_t object_id, 2646 intptr_t object_id,
2647 Snapshot::Kind kind) { 2647 Snapshot::Kind kind) {
2648 UNREACHABLE(); 2648 UNREACHABLE();
2649 } 2649 }
2650 2650
2651 } // namespace dart 2651 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698