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

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

Issue 1574213005: Report missing semicolons after function declarations (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/report.h » ('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/native_entry.h" 5 #include "vm/native_entry.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/stub_code.h" 9 #include "vm/stub_code.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 bool as_reference) { 2030 bool as_reference) {
2031 ASSERT(reader != NULL); 2031 ASSERT(reader != NULL);
2032 2032
2033 // Allocate LanguageError object. 2033 // Allocate LanguageError object.
2034 LanguageError& language_error = 2034 LanguageError& language_error =
2035 LanguageError::ZoneHandle(reader->zone(), NEW_OBJECT(LanguageError)); 2035 LanguageError::ZoneHandle(reader->zone(), NEW_OBJECT(LanguageError));
2036 reader->AddBackRef(object_id, &language_error, kIsDeserialized); 2036 reader->AddBackRef(object_id, &language_error, kIsDeserialized);
2037 2037
2038 // Set all non object fields. 2038 // Set all non object fields.
2039 language_error.set_token_pos(reader->Read<int32_t>()); 2039 language_error.set_token_pos(reader->Read<int32_t>());
2040 language_error.set_report_after_token(reader->Read<bool>());
2040 language_error.set_kind(reader->Read<uint8_t>()); 2041 language_error.set_kind(reader->Read<uint8_t>());
2041 2042
2042 // Set all the object fields. 2043 // Set all the object fields.
2043 READ_OBJECT_FIELDS(language_error, 2044 READ_OBJECT_FIELDS(language_error,
2044 language_error.raw()->from(), language_error.raw()->to(), 2045 language_error.raw()->from(), language_error.raw()->to(),
2045 kAsReference); 2046 kAsReference);
2046 2047
2047 return language_error.raw(); 2048 return language_error.raw();
2048 } 2049 }
2049 2050
2050 2051
2051 void RawLanguageError::WriteTo(SnapshotWriter* writer, 2052 void RawLanguageError::WriteTo(SnapshotWriter* writer,
2052 intptr_t object_id, 2053 intptr_t object_id,
2053 Snapshot::Kind kind, 2054 Snapshot::Kind kind,
2054 bool as_reference) { 2055 bool as_reference) {
2055 ASSERT(writer != NULL); 2056 ASSERT(writer != NULL);
2056 2057
2057 // Write out the serialization header value for this object. 2058 // Write out the serialization header value for this object.
2058 writer->WriteInlinedObjectHeader(object_id); 2059 writer->WriteInlinedObjectHeader(object_id);
2059 2060
2060 // Write out the class and tags information. 2061 // Write out the class and tags information.
2061 writer->WriteVMIsolateObject(kLanguageErrorCid); 2062 writer->WriteVMIsolateObject(kLanguageErrorCid);
2062 writer->WriteTags(writer->GetObjectTags(this)); 2063 writer->WriteTags(writer->GetObjectTags(this));
2063 2064
2064 // Write out all the non object fields. 2065 // Write out all the non object fields.
2065 writer->Write<int32_t>(ptr()->token_pos_); 2066 writer->Write<int32_t>(ptr()->token_pos_);
2067 writer->Write<bool>(ptr()->report_after_token_);
2066 writer->Write<uint8_t>(ptr()->kind_); 2068 writer->Write<uint8_t>(ptr()->kind_);
2067 2069
2068 // Write out all the object pointer fields. 2070 // Write out all the object pointer fields.
2069 SnapshotWriterVisitor visitor(writer, kAsReference); 2071 SnapshotWriterVisitor visitor(writer, kAsReference);
2070 visitor.VisitPointers(from(), to()); 2072 visitor.VisitPointers(from(), to());
2071 } 2073 }
2072 2074
2073 2075
2074 RawUnhandledException* UnhandledException::ReadFrom(SnapshotReader* reader, 2076 RawUnhandledException* UnhandledException::ReadFrom(SnapshotReader* reader,
2075 intptr_t object_id, 2077 intptr_t object_id,
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
3512 // We do not allow objects with native fields in an isolate message. 3514 // We do not allow objects with native fields in an isolate message.
3513 writer->SetWriteException(Exceptions::kArgument, 3515 writer->SetWriteException(Exceptions::kArgument,
3514 "Illegal argument in isolate message" 3516 "Illegal argument in isolate message"
3515 " : (object is a UserTag)"); 3517 " : (object is a UserTag)");
3516 } else { 3518 } else {
3517 UNREACHABLE(); 3519 UNREACHABLE();
3518 } 3520 }
3519 } 3521 }
3520 3522
3521 } // namespace dart 3523 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/report.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698