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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2975 return result.raw(); | 2975 return result.raw(); |
2976 } | 2976 } |
2977 | 2977 |
2978 | 2978 |
2979 // Ensure that top level parsing of the class has been done. | 2979 // Ensure that top level parsing of the class has been done. |
2980 RawError* Class::EnsureIsFinalized(Thread* thread) const { | 2980 RawError* Class::EnsureIsFinalized(Thread* thread) const { |
2981 // Finalized classes have already been parsed. | 2981 // Finalized classes have already been parsed. |
2982 if (is_finalized()) { | 2982 if (is_finalized()) { |
2983 return Error::null(); | 2983 return Error::null(); |
2984 } | 2984 } |
| 2985 if (Compiler::IsBackgroundCompilation()) { |
| 2986 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); |
| 2987 } |
2985 ASSERT(thread->IsMutatorThread()); | 2988 ASSERT(thread->IsMutatorThread()); |
2986 ASSERT(thread != NULL); | 2989 ASSERT(thread != NULL); |
2987 const Error& error = Error::Handle( | 2990 const Error& error = Error::Handle( |
2988 thread->zone(), Compiler::CompileClass(*this)); | 2991 thread->zone(), Compiler::CompileClass(*this)); |
2989 if (!error.IsNull()) { | 2992 if (!error.IsNull()) { |
2990 ASSERT(thread == Thread::Current()); | 2993 ASSERT(thread == Thread::Current()); |
2991 if (thread->long_jump_base() != NULL) { | 2994 if (thread->long_jump_base() != NULL) { |
2992 Report::LongJump(error); | 2995 Report::LongJump(error); |
2993 UNREACHABLE(); | 2996 UNREACHABLE(); |
2994 } | 2997 } |
(...skipping 18729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21724 return UserTag::null(); | 21727 return UserTag::null(); |
21725 } | 21728 } |
21726 | 21729 |
21727 | 21730 |
21728 const char* UserTag::ToCString() const { | 21731 const char* UserTag::ToCString() const { |
21729 const String& tag_label = String::Handle(label()); | 21732 const String& tag_label = String::Handle(label()); |
21730 return tag_label.ToCString(); | 21733 return tag_label.ToCString(); |
21731 } | 21734 } |
21732 | 21735 |
21733 } // namespace dart | 21736 } // namespace dart |
OLD | NEW |