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 15388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15399 ASSERT(Object::unwind_error_class() != Class::null()); | 15399 ASSERT(Object::unwind_error_class() != Class::null()); |
15400 UnwindError& result = UnwindError::Handle(); | 15400 UnwindError& result = UnwindError::Handle(); |
15401 { | 15401 { |
15402 RawObject* raw = Object::Allocate(UnwindError::kClassId, | 15402 RawObject* raw = Object::Allocate(UnwindError::kClassId, |
15403 UnwindError::InstanceSize(), space); | 15403 UnwindError::InstanceSize(), space); |
15404 NoSafepointScope no_safepoint; | 15404 NoSafepointScope no_safepoint; |
15405 result ^= raw; | 15405 result ^= raw; |
15406 } | 15406 } |
15407 result.set_message(message); | 15407 result.set_message(message); |
15408 result.set_is_user_initiated(false); | 15408 result.set_is_user_initiated(false); |
15409 result.set_is_vm_restart(false); | |
15410 return result.raw(); | 15409 return result.raw(); |
15411 } | 15410 } |
15412 | 15411 |
15413 | 15412 |
15414 void UnwindError::set_message(const String& message) const { | 15413 void UnwindError::set_message(const String& message) const { |
15415 StorePointer(&raw_ptr()->message_, message.raw()); | 15414 StorePointer(&raw_ptr()->message_, message.raw()); |
15416 } | 15415 } |
15417 | 15416 |
15418 | 15417 |
15419 void UnwindError::set_is_user_initiated(bool value) const { | 15418 void UnwindError::set_is_user_initiated(bool value) const { |
15420 StoreNonPointer(&raw_ptr()->is_user_initiated_, value); | 15419 StoreNonPointer(&raw_ptr()->is_user_initiated_, value); |
15421 } | 15420 } |
15422 | 15421 |
15423 | 15422 |
15424 void UnwindError::set_is_vm_restart(bool value) const { | |
15425 StoreNonPointer(&raw_ptr()->is_vm_restart_, value); | |
15426 } | |
15427 | |
15428 | |
15429 const char* UnwindError::ToErrorCString() const { | 15423 const char* UnwindError::ToErrorCString() const { |
15430 const String& msg_str = String::Handle(message()); | 15424 const String& msg_str = String::Handle(message()); |
15431 return msg_str.ToCString(); | 15425 return msg_str.ToCString(); |
15432 } | 15426 } |
15433 | 15427 |
15434 | 15428 |
15435 const char* UnwindError::ToCString() const { | 15429 const char* UnwindError::ToCString() const { |
15436 return "UnwindError"; | 15430 return "UnwindError"; |
15437 } | 15431 } |
15438 | 15432 |
(...skipping 7540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22979 return UserTag::null(); | 22973 return UserTag::null(); |
22980 } | 22974 } |
22981 | 22975 |
22982 | 22976 |
22983 const char* UserTag::ToCString() const { | 22977 const char* UserTag::ToCString() const { |
22984 const String& tag_label = String::Handle(label()); | 22978 const String& tag_label = String::Handle(label()); |
22985 return tag_label.ToCString(); | 22979 return tag_label.ToCString(); |
22986 } | 22980 } |
22987 | 22981 |
22988 } // namespace dart | 22982 } // namespace dart |
OLD | NEW |