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

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

Issue 2483363002: clang-formats remaining files and adds a presubmit check. (Closed)
Patch Set: Format include file Created 4 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
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/snapshot_test.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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return kStringType; 137 return kStringType;
138 } else if (raw_type == object_store->array_type()) { 138 } else if (raw_type == object_store->array_type()) {
139 return kArrayType; 139 return kArrayType;
140 } 140 }
141 return kInvalidIndex; 141 return kInvalidIndex;
142 } 142 }
143 143
144 144
145 const char* Snapshot::KindToCString(Kind kind) { 145 const char* Snapshot::KindToCString(Kind kind) {
146 switch (kind) { 146 switch (kind) {
147 case kCore: return "core"; 147 case kCore:
148 case kScript: return "script"; 148 return "core";
149 case kMessage: return "message"; 149 case kScript:
150 case kAppWithJIT: return "app-jit"; 150 return "script";
151 case kAppNoJIT: return "app-aot"; 151 case kMessage:
152 case kNone: return "none"; 152 return "message";
153 case kAppWithJIT:
154 return "app-jit";
155 case kAppNoJIT:
156 return "app-aot";
157 case kNone:
158 return "none";
153 case kInvalid: 159 case kInvalid:
154 default: 160 default:
155 return "invalid"; 161 return "invalid";
156 } 162 }
157 } 163 }
158 164
159 165
160 // TODO(5411462): Temporary setup of snapshot for testing purposes, 166 // TODO(5411462): Temporary setup of snapshot for testing purposes,
161 // the actual creation of a snapshot maybe done differently. 167 // the actual creation of a snapshot maybe done differently.
162 const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) { 168 const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) {
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 if (setjmp(*jump.Set()) == 0) { 1956 if (setjmp(*jump.Set()) == 0) {
1951 NoSafepointScope no_safepoint; 1957 NoSafepointScope no_safepoint;
1952 WriteObject(obj.raw()); 1958 WriteObject(obj.raw());
1953 } else { 1959 } else {
1954 ThrowException(exception_type(), exception_msg()); 1960 ThrowException(exception_type(), exception_msg());
1955 } 1961 }
1956 } 1962 }
1957 1963
1958 1964
1959 } // namespace dart 1965 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698