| 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 5264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5275 | 5275 |
| 5276 | 5276 |
| 5277 bool Function::HasCode() const { | 5277 bool Function::HasCode() const { |
| 5278 ASSERT(raw_ptr()->code_ != Code::null()); | 5278 ASSERT(raw_ptr()->code_ != Code::null()); |
| 5279 return raw_ptr()->code_ != StubCode::LazyCompile_entry()->code(); | 5279 return raw_ptr()->code_ != StubCode::LazyCompile_entry()->code(); |
| 5280 } | 5280 } |
| 5281 | 5281 |
| 5282 | 5282 |
| 5283 void Function::ClearCode() const { | 5283 void Function::ClearCode() const { |
| 5284 ASSERT(Thread::Current()->IsMutatorThread()); | 5284 ASSERT(Thread::Current()->IsMutatorThread()); |
| 5285 ASSERT((usage_counter() != 0) || (ic_data_array() == Array::null())); | |
| 5286 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); | 5285 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); |
| 5287 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code())); | 5286 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code())); |
| 5288 } | 5287 } |
| 5289 | 5288 |
| 5290 | 5289 |
| 5291 void Function::EnsureHasCompiledUnoptimizedCode() const { | 5290 void Function::EnsureHasCompiledUnoptimizedCode() const { |
| 5292 Thread* thread = Thread::Current(); | 5291 Thread* thread = Thread::Current(); |
| 5293 Zone* zone = thread->zone(); | 5292 Zone* zone = thread->zone(); |
| 5294 ASSERT(thread->IsMutatorThread()); | 5293 ASSERT(thread->IsMutatorThread()); |
| 5295 | 5294 |
| (...skipping 17299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22595 return UserTag::null(); | 22594 return UserTag::null(); |
| 22596 } | 22595 } |
| 22597 | 22596 |
| 22598 | 22597 |
| 22599 const char* UserTag::ToCString() const { | 22598 const char* UserTag::ToCString() const { |
| 22600 const String& tag_label = String::Handle(label()); | 22599 const String& tag_label = String::Handle(label()); |
| 22601 return tag_label.ToCString(); | 22600 return tag_label.ToCString(); |
| 22602 } | 22601 } |
| 22603 | 22602 |
| 22604 } // namespace dart | 22603 } // namespace dart |
| OLD | NEW |