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 5239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5250 | 5250 |
5251 | 5251 |
5252 bool Function::HasCode() const { | 5252 bool Function::HasCode() const { |
5253 ASSERT(raw_ptr()->instructions_ != Instructions::null()); | 5253 ASSERT(raw_ptr()->instructions_ != Instructions::null()); |
5254 return raw_ptr()->instructions_ != | 5254 return raw_ptr()->instructions_ != |
5255 StubCode::LazyCompile_entry()->code()->ptr()->instructions_; | 5255 StubCode::LazyCompile_entry()->code()->ptr()->instructions_; |
5256 } | 5256 } |
5257 | 5257 |
5258 | 5258 |
5259 void Function::ClearCode() const { | 5259 void Function::ClearCode() const { |
5260 ASSERT(ic_data_array() == Array::null()); | 5260 ASSERT((usage_counter() != 0) || (ic_data_array() == Array::null())); |
5261 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); | 5261 StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); |
5262 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code())); | 5262 SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code())); |
5263 } | 5263 } |
5264 | 5264 |
5265 | 5265 |
5266 void Function::SwitchToUnoptimizedCode() const { | 5266 void Function::SwitchToUnoptimizedCode() const { |
5267 ASSERT(HasOptimizedCode()); | 5267 ASSERT(HasOptimizedCode()); |
5268 Thread* thread = Thread::Current(); | 5268 Thread* thread = Thread::Current(); |
5269 Isolate* isolate = thread->isolate(); | 5269 Isolate* isolate = thread->isolate(); |
5270 Zone* zone = thread->zone(); | 5270 Zone* zone = thread->zone(); |
(...skipping 16282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21553 return tag_label.ToCString(); | 21553 return tag_label.ToCString(); |
21554 } | 21554 } |
21555 | 21555 |
21556 | 21556 |
21557 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21557 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
21558 Instance::PrintJSONImpl(stream, ref); | 21558 Instance::PrintJSONImpl(stream, ref); |
21559 } | 21559 } |
21560 | 21560 |
21561 | 21561 |
21562 } // namespace dart | 21562 } // namespace dart |
OLD | NEW |