| 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 5567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5578 result.set_data(data); | 5578 result.set_data(data); |
| 5579 } | 5579 } |
| 5580 return result.raw(); | 5580 return result.raw(); |
| 5581 } | 5581 } |
| 5582 | 5582 |
| 5583 | 5583 |
| 5584 RawFunction* Function::Clone(const Class& new_owner) const { | 5584 RawFunction* Function::Clone(const Class& new_owner) const { |
| 5585 ASSERT(!IsConstructor()); | 5585 ASSERT(!IsConstructor()); |
| 5586 Function& clone = Function::Handle(); | 5586 Function& clone = Function::Handle(); |
| 5587 clone ^= Object::Clone(*this, Heap::kOld); | 5587 clone ^= Object::Clone(*this, Heap::kOld); |
| 5588 const Class& owner = Class::Handle(this->Owner()); | 5588 const Class& origin = Class::Handle(this->origin()); |
| 5589 const PatchClass& clone_owner = | 5589 const PatchClass& clone_owner = |
| 5590 PatchClass::Handle(PatchClass::New(new_owner, owner)); | 5590 PatchClass::Handle(PatchClass::New(new_owner, origin)); |
| 5591 clone.set_owner(clone_owner); | 5591 clone.set_owner(clone_owner); |
| 5592 clone.StorePointer(&clone.raw_ptr()->code_, Code::null()); | 5592 clone.StorePointer(&clone.raw_ptr()->code_, Code::null()); |
| 5593 clone.StorePointer(&clone.raw_ptr()->unoptimized_code_, Code::null()); | 5593 clone.StorePointer(&clone.raw_ptr()->unoptimized_code_, Code::null()); |
| 5594 clone.set_usage_counter(0); | 5594 clone.set_usage_counter(0); |
| 5595 clone.set_deoptimization_counter(0); | 5595 clone.set_deoptimization_counter(0); |
| 5596 clone.set_optimized_instruction_count(0); | 5596 clone.set_optimized_instruction_count(0); |
| 5597 clone.set_optimized_call_site_count(0); | 5597 clone.set_optimized_call_site_count(0); |
| 5598 return clone.raw(); | 5598 return clone.raw(); |
| 5599 } | 5599 } |
| 5600 | 5600 |
| (...skipping 11855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17456 return "_MirrorReference"; | 17456 return "_MirrorReference"; |
| 17457 } | 17457 } |
| 17458 | 17458 |
| 17459 | 17459 |
| 17460 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 17460 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 17461 Instance::PrintToJSONStream(stream, ref); | 17461 Instance::PrintToJSONStream(stream, ref); |
| 17462 } | 17462 } |
| 17463 | 17463 |
| 17464 | 17464 |
| 17465 } // namespace dart | 17465 } // namespace dart |
| OLD | NEW |