OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |