| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/isolate_reload.h" | 5 #include "vm/isolate_reload.h" |
| 6 | 6 |
| 7 #include "vm/become.h" | 7 #include "vm/become.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 | 200 |
| 201 void ReasonForCancelling::AppendTo(JSONArray* array) { | 201 void ReasonForCancelling::AppendTo(JSONArray* array) { |
| 202 JSONObject jsobj(array); | 202 JSONObject jsobj(array); |
| 203 jsobj.AddProperty("type", "ReasonForCancelling"); | 203 jsobj.AddProperty("type", "ReasonForCancelling"); |
| 204 const String& message = String::Handle(ToString()); | 204 const String& message = String::Handle(ToString()); |
| 205 jsobj.AddProperty("message", message.ToCString()); | 205 jsobj.AddProperty("message", message.ToCString()); |
| 206 } | 206 } |
| 207 | 207 |
| 208 | 208 |
| 209 ClassReasonForCancelling::ClassReasonForCancelling(Zone* zone, |
| 210 const Class& from, |
| 211 const Class& to) |
| 212 : ReasonForCancelling(zone), |
| 213 from_(Class::ZoneHandle(zone, from.raw())), |
| 214 to_(Class::ZoneHandle(zone, to.raw())) { |
| 215 } |
| 216 |
| 217 |
| 209 void ClassReasonForCancelling::AppendTo(JSONArray* array) { | 218 void ClassReasonForCancelling::AppendTo(JSONArray* array) { |
| 210 JSONObject jsobj(array); | 219 JSONObject jsobj(array); |
| 211 jsobj.AddProperty("type", "ReasonForCancelling"); | 220 jsobj.AddProperty("type", "ReasonForCancelling"); |
| 212 jsobj.AddProperty("class", from_); | 221 jsobj.AddProperty("class", from_); |
| 213 const String& message = String::Handle(ToString()); | 222 const String& message = String::Handle(ToString()); |
| 214 jsobj.AddProperty("message", message.ToCString()); | 223 jsobj.AddProperty("message", message.ToCString()); |
| 215 } | 224 } |
| 216 | 225 |
| 217 | 226 |
| 218 RawError* IsolateReloadContext::error() const { | 227 RawError* IsolateReloadContext::error() const { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 415 |
| 407 | 416 |
| 408 void IsolateReloadContext::ReportSuccess() { | 417 void IsolateReloadContext::ReportSuccess() { |
| 409 ServiceEvent service_event(I, ServiceEvent::kIsolateReload); | 418 ServiceEvent service_event(I, ServiceEvent::kIsolateReload); |
| 410 Service::HandleEvent(&service_event); | 419 Service::HandleEvent(&service_event); |
| 411 } | 420 } |
| 412 | 421 |
| 413 | 422 |
| 414 class Aborted : public ReasonForCancelling { | 423 class Aborted : public ReasonForCancelling { |
| 415 public: | 424 public: |
| 416 explicit Aborted(Zone* zone, const Error& error) | 425 Aborted(Zone* zone, const Error& error) |
| 417 : ReasonForCancelling(zone), error_(error) { } | 426 : ReasonForCancelling(zone), |
| 427 error_(Error::ZoneHandle(zone, error.raw())) { |
| 428 } |
| 418 | 429 |
| 419 private: | 430 private: |
| 420 const Error& error_; | 431 const Error& error_; |
| 421 | 432 |
| 422 RawError* ToError() { return error_.raw(); } | 433 RawError* ToError() { return error_.raw(); } |
| 423 RawString* ToString() { | 434 RawString* ToString() { |
| 424 return String::NewFormatted("%s", error_.ToErrorCString()); | 435 return String::NewFormatted("%s", error_.ToErrorCString()); |
| 425 } | 436 } |
| 426 }; | 437 }; |
| 427 | 438 |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 ASSERT(!super_cls.IsNull()); | 1677 ASSERT(!super_cls.IsNull()); |
| 1667 super_cls.AddDirectSubclass(cls); | 1678 super_cls.AddDirectSubclass(cls); |
| 1668 } | 1679 } |
| 1669 } | 1680 } |
| 1670 } | 1681 } |
| 1671 } | 1682 } |
| 1672 | 1683 |
| 1673 #endif // !PRODUCT | 1684 #endif // !PRODUCT |
| 1674 | 1685 |
| 1675 } // namespace dart | 1686 } // namespace dart |
| OLD | NEW |