Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 1864143002: Add instruction tags to saved ICData (debug mode only). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 ((*deopt_id_to_ic_data_)[deopt_id] != NULL)) { 1688 ((*deopt_id_to_ic_data_)[deopt_id] != NULL)) {
1689 const ICData* res = (*deopt_id_to_ic_data_)[deopt_id]; 1689 const ICData* res = (*deopt_id_to_ic_data_)[deopt_id];
1690 ASSERT(res->deopt_id() == deopt_id); 1690 ASSERT(res->deopt_id() == deopt_id);
1691 ASSERT(res->target_name() == target_name.raw()); 1691 ASSERT(res->target_name() == target_name.raw());
1692 ASSERT(res->NumArgsTested() == num_args_tested); 1692 ASSERT(res->NumArgsTested() == num_args_tested);
1693 return res; 1693 return res;
1694 } 1694 }
1695 const ICData& ic_data = ICData::ZoneHandle(zone(), ICData::New( 1695 const ICData& ic_data = ICData::ZoneHandle(zone(), ICData::New(
1696 parsed_function().function(), target_name, 1696 parsed_function().function(), target_name,
1697 arguments_descriptor, deopt_id, num_args_tested)); 1697 arguments_descriptor, deopt_id, num_args_tested));
1698 #if defined(TAG_IC_DATA)
1699 ic_data.set_tag(Instruction::kInstanceCall);
1700 #endif
1698 if (deopt_id_to_ic_data_ != NULL) { 1701 if (deopt_id_to_ic_data_ != NULL) {
1699 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data; 1702 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data;
1700 } 1703 }
1701 return &ic_data; 1704 return &ic_data;
1702 } 1705 }
1703 1706
1704 1707
1705 const ICData* FlowGraphCompiler::GetOrAddStaticCallICData( 1708 const ICData* FlowGraphCompiler::GetOrAddStaticCallICData(
1706 intptr_t deopt_id, 1709 intptr_t deopt_id,
1707 const Function& target, 1710 const Function& target,
1708 const Array& arguments_descriptor, 1711 const Array& arguments_descriptor,
1709 intptr_t num_args_tested) { 1712 intptr_t num_args_tested) {
1710 if ((deopt_id_to_ic_data_ != NULL) && 1713 if ((deopt_id_to_ic_data_ != NULL) &&
1711 ((*deopt_id_to_ic_data_)[deopt_id] != NULL)) { 1714 ((*deopt_id_to_ic_data_)[deopt_id] != NULL)) {
1712 const ICData* res = (*deopt_id_to_ic_data_)[deopt_id]; 1715 const ICData* res = (*deopt_id_to_ic_data_)[deopt_id];
1713 ASSERT(res->deopt_id() == deopt_id); 1716 ASSERT(res->deopt_id() == deopt_id);
1714 ASSERT(res->target_name() == target.name()); 1717 ASSERT(res->target_name() == target.name());
1715 ASSERT(res->NumArgsTested() == num_args_tested); 1718 ASSERT(res->NumArgsTested() == num_args_tested);
1716 return res; 1719 return res;
1717 } 1720 }
1718 const ICData& ic_data = ICData::ZoneHandle(zone(), ICData::New( 1721 const ICData& ic_data = ICData::ZoneHandle(zone(), ICData::New(
1719 parsed_function().function(), String::Handle(zone(), target.name()), 1722 parsed_function().function(), String::Handle(zone(), target.name()),
1720 arguments_descriptor, deopt_id, num_args_tested)); 1723 arguments_descriptor, deopt_id, num_args_tested));
1721 ic_data.AddTarget(target); 1724 ic_data.AddTarget(target);
1725 #if defined(TAG_IC_DATA)
1726 ic_data.set_tag(Instruction::kStaticCall);
1727 #endif
1722 if (deopt_id_to_ic_data_ != NULL) { 1728 if (deopt_id_to_ic_data_ != NULL) {
1723 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data; 1729 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data;
1724 } 1730 }
1725 return &ic_data; 1731 return &ic_data;
1726 } 1732 }
1727 1733
1728 1734
1729 intptr_t FlowGraphCompiler::GetOptimizationThreshold() const { 1735 intptr_t FlowGraphCompiler::GetOptimizationThreshold() const {
1730 intptr_t threshold; 1736 intptr_t threshold;
1731 if (is_optimizing()) { 1737 if (is_optimizing()) {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 1940
1935 1941
1936 void FlowGraphCompiler::FrameStateClear() { 1942 void FlowGraphCompiler::FrameStateClear() {
1937 ASSERT(!is_optimizing()); 1943 ASSERT(!is_optimizing());
1938 frame_state_.TruncateTo(0); 1944 frame_state_.TruncateTo(0);
1939 } 1945 }
1940 #endif 1946 #endif
1941 1947
1942 1948
1943 } // namespace dart 1949 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698