OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/isolate_reload.h" | 5 #include "vm/isolate_reload.h" |
6 | 6 |
7 #include "vm/become.h" | 7 #include "vm/become.h" |
8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
9 #include "vm/compiler/jit/compiler.h" | 9 #include "vm/compiler/jit/compiler.h" |
10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 func.set_optimized_instruction_count(0); | 1655 func.set_optimized_instruction_count(0); |
1656 func.set_optimized_call_site_count(0); | 1656 func.set_optimized_call_site_count(0); |
1657 } | 1657 } |
1658 } | 1658 } |
1659 | 1659 |
1660 private: | 1660 private: |
1661 void ClearAllCode(const Function& func) { | 1661 void ClearAllCode(const Function& func) { |
1662 // Null out the ICData array and code. | 1662 // Null out the ICData array and code. |
1663 func.ClearICDataArray(); | 1663 func.ClearICDataArray(); |
1664 func.ClearCode(); | 1664 func.ClearCode(); |
1665 func.set_was_compiled(false); | 1665 func.SetWasCompiled(false); |
1666 } | 1666 } |
1667 | 1667 |
1668 void PreserveUnoptimizedCode() { | 1668 void PreserveUnoptimizedCode() { |
1669 ASSERT(!code_.IsNull()); | 1669 ASSERT(!code_.IsNull()); |
1670 // We are preserving the unoptimized code, fill all ICData arrays with | 1670 // We are preserving the unoptimized code, fill all ICData arrays with |
1671 // the sentinel values so that we have no stale type feedback. | 1671 // the sentinel values so that we have no stale type feedback. |
1672 code_.ResetICDatas(zone_); | 1672 code_.ResetICDatas(zone_); |
1673 } | 1673 } |
1674 | 1674 |
1675 bool IsFromDirtyLibrary(const Function& func) { | 1675 bool IsFromDirtyLibrary(const Function& func) { |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1897 ASSERT(!super_cls.IsNull()); | 1897 ASSERT(!super_cls.IsNull()); |
1898 super_cls.AddDirectSubclass(cls); | 1898 super_cls.AddDirectSubclass(cls); |
1899 } | 1899 } |
1900 } | 1900 } |
1901 } | 1901 } |
1902 } | 1902 } |
1903 | 1903 |
1904 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) | 1904 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) |
1905 | 1905 |
1906 } // namespace dart | 1906 } // namespace dart |
OLD | NEW |