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

Side by Side Diff: runtime/vm/intermediate_language.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/vm/flow_graph_compiler.cc ('k') | runtime/vm/object.h » ('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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/constant_propagator.h" 10 #include "vm/constant_propagator.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 return defn; 82 return defn;
83 } 83 }
84 84
85 85
86 const ICData* Instruction::GetICData( 86 const ICData* Instruction::GetICData(
87 const ZoneGrowableArray<const ICData*>& ic_data_array) const { 87 const ZoneGrowableArray<const ICData*>& ic_data_array) const {
88 // The deopt_id can be outside the range of the IC data array for 88 // The deopt_id can be outside the range of the IC data array for
89 // computations added in the optimizing compiler. 89 // computations added in the optimizing compiler.
90 ASSERT(deopt_id_ != Thread::kNoDeoptId); 90 ASSERT(deopt_id_ != Thread::kNoDeoptId);
91 if (deopt_id_ < ic_data_array.length()) { 91 if (deopt_id_ < ic_data_array.length()) {
92 return ic_data_array[deopt_id_]; 92 const ICData* result = ic_data_array[deopt_id_];
93 #if defined(TAG_IC_DATA)
94 if (result->tag() == -1) {
95 result->set_tag(tag());
96 } else if (result->tag() != tag()) {
97 FATAL("ICData tag mismatch");
98 }
99 #endif
100 return result;
93 } 101 }
94 return NULL; 102 return NULL;
95 } 103 }
96 104
97 105
98 intptr_t Instruction::Hashcode() const { 106 intptr_t Instruction::Hashcode() const {
99 intptr_t result = tag(); 107 intptr_t result = tag();
100 for (intptr_t i = 0; i < InputCount(); ++i) { 108 for (intptr_t i = 0; i < InputCount(); ++i) {
101 Value* value = InputAt(i); 109 Value* value = InputAt(i);
102 intptr_t j = value->definition()->ssa_temp_index(); 110 intptr_t j = value->definition()->ssa_temp_index();
(...skipping 3648 matching lines...) Expand 10 before | Expand all | Expand 10 after
3751 set_native_c_function(native_function); 3759 set_native_c_function(native_function);
3752 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3760 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3753 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3761 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3754 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3762 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3755 set_is_bootstrap_native(is_bootstrap_native); 3763 set_is_bootstrap_native(is_bootstrap_native);
3756 } 3764 }
3757 3765
3758 #undef __ 3766 #undef __
3759 3767
3760 } // namespace dart 3768 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698