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/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/become.h" | 10 #include "vm/become.h" |
(...skipping 15389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15400 ASSERT(Object::unwind_error_class() != Class::null()); | 15400 ASSERT(Object::unwind_error_class() != Class::null()); |
15401 UnwindError& result = UnwindError::Handle(); | 15401 UnwindError& result = UnwindError::Handle(); |
15402 { | 15402 { |
15403 RawObject* raw = Object::Allocate(UnwindError::kClassId, | 15403 RawObject* raw = Object::Allocate(UnwindError::kClassId, |
15404 UnwindError::InstanceSize(), space); | 15404 UnwindError::InstanceSize(), space); |
15405 NoSafepointScope no_safepoint; | 15405 NoSafepointScope no_safepoint; |
15406 result ^= raw; | 15406 result ^= raw; |
15407 } | 15407 } |
15408 result.set_message(message); | 15408 result.set_message(message); |
15409 result.set_is_user_initiated(false); | 15409 result.set_is_user_initiated(false); |
15410 result.set_is_vm_restart(false); | |
15411 return result.raw(); | 15410 return result.raw(); |
15412 } | 15411 } |
15413 | 15412 |
15414 | 15413 |
15415 void UnwindError::set_message(const String& message) const { | 15414 void UnwindError::set_message(const String& message) const { |
15416 StorePointer(&raw_ptr()->message_, message.raw()); | 15415 StorePointer(&raw_ptr()->message_, message.raw()); |
15417 } | 15416 } |
15418 | 15417 |
15419 | 15418 |
15420 void UnwindError::set_is_user_initiated(bool value) const { | 15419 void UnwindError::set_is_user_initiated(bool value) const { |
15421 StoreNonPointer(&raw_ptr()->is_user_initiated_, value); | 15420 StoreNonPointer(&raw_ptr()->is_user_initiated_, value); |
15422 } | 15421 } |
15423 | 15422 |
15424 | 15423 |
15425 void UnwindError::set_is_vm_restart(bool value) const { | |
15426 StoreNonPointer(&raw_ptr()->is_vm_restart_, value); | |
15427 } | |
15428 | |
15429 | |
15430 const char* UnwindError::ToErrorCString() const { | 15424 const char* UnwindError::ToErrorCString() const { |
15431 const String& msg_str = String::Handle(message()); | 15425 const String& msg_str = String::Handle(message()); |
15432 return msg_str.ToCString(); | 15426 return msg_str.ToCString(); |
15433 } | 15427 } |
15434 | 15428 |
15435 | 15429 |
15436 const char* UnwindError::ToCString() const { | 15430 const char* UnwindError::ToCString() const { |
15437 return "UnwindError"; | 15431 return "UnwindError"; |
15438 } | 15432 } |
15439 | 15433 |
(...skipping 7617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
23057 return UserTag::null(); | 23051 return UserTag::null(); |
23058 } | 23052 } |
23059 | 23053 |
23060 | 23054 |
23061 const char* UserTag::ToCString() const { | 23055 const char* UserTag::ToCString() const { |
23062 const String& tag_label = String::Handle(label()); | 23056 const String& tag_label = String::Handle(label()); |
23063 return tag_label.ToCString(); | 23057 return tag_label.ToCString(); |
23064 } | 23058 } |
23065 | 23059 |
23066 } // namespace dart | 23060 } // namespace dart |
OLD | NEW |