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 6735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6746 | 6746 |
6747 void Function::set_ic_data_array(const Array& value) const { | 6747 void Function::set_ic_data_array(const Array& value) const { |
6748 StorePointer(&raw_ptr()->ic_data_array_, value.raw()); | 6748 StorePointer(&raw_ptr()->ic_data_array_, value.raw()); |
6749 } | 6749 } |
6750 | 6750 |
6751 | 6751 |
6752 RawArray* Function::ic_data_array() const { | 6752 RawArray* Function::ic_data_array() const { |
6753 return raw_ptr()->ic_data_array_; | 6753 return raw_ptr()->ic_data_array_; |
6754 } | 6754 } |
6755 | 6755 |
6756 void Function::ClearICData() const { | 6756 void Function::ClearICDataArray() const { |
6757 set_ic_data_array(Array::Handle()); | 6757 set_ic_data_array(Array::Handle()); |
6758 } | 6758 } |
6759 | 6759 |
6760 | 6760 |
| 6761 void Function::SetDeoptReasonForAll(intptr_t deopt_id, |
| 6762 ICData::DeoptReasonId reason) { |
| 6763 const Array& icd_array = Array::Handle(ic_data_array()); |
| 6764 ICData& icd = ICData::Handle(); |
| 6765 for (intptr_t i = 0; i < icd_array.Length(); i++) { |
| 6766 icd ^= icd_array.At(i); |
| 6767 if (icd.deopt_id() == deopt_id) { |
| 6768 icd.AddDeoptReason(reason); |
| 6769 } |
| 6770 } |
| 6771 } |
| 6772 |
| 6773 |
6761 bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const { | 6774 bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const { |
6762 if (SourceFingerprint() != fp) { | 6775 if (SourceFingerprint() != fp) { |
6763 const bool recalculatingFingerprints = false; | 6776 const bool recalculatingFingerprints = false; |
6764 if (recalculatingFingerprints) { | 6777 if (recalculatingFingerprints) { |
6765 // This output can be copied into a file, then used with sed | 6778 // This output can be copied into a file, then used with sed |
6766 // to replace the old values. | 6779 // to replace the old values. |
6767 // sed -i .bak -f /tmp/newkeys runtime/vm/method_recognizer.h | 6780 // sed -i .bak -f /tmp/newkeys runtime/vm/method_recognizer.h |
6768 // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h | 6781 // sed -i .bak -f /tmp/newkeys runtime/vm/flow_graph_builder.h |
6769 OS::Print("s/V(%s, %d)/V(%s, %d)/\n", | 6782 OS::Print("s/V(%s, %d)/V(%s, %d)/\n", |
6770 prefix, fp, prefix, SourceFingerprint()); | 6783 prefix, fp, prefix, SourceFingerprint()); |
(...skipping 14036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20807 return tag_label.ToCString(); | 20820 return tag_label.ToCString(); |
20808 } | 20821 } |
20809 | 20822 |
20810 | 20823 |
20811 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20824 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
20812 Instance::PrintJSONImpl(stream, ref); | 20825 Instance::PrintJSONImpl(stream, ref); |
20813 } | 20826 } |
20814 | 20827 |
20815 | 20828 |
20816 } // namespace dart | 20829 } // namespace dart |
OLD | NEW |