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

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

Issue 2044423003: Remember inside an ICData if it is for a static call or an instance call (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/isolate_reload.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/jit_optimizer.h" 5 #include "vm/jit_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/branch_optimizer.h" 8 #include "vm/branch_optimizer.h"
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const Function& function = 210 const Function& function =
211 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid)); 211 Function::Handle(Z, ic_data.GetTargetForReceiverClassId(cid));
212 // TODO(fschneider): Try looking up the function on the class if it is 212 // TODO(fschneider): Try looking up the function on the class if it is
213 // not found in the ICData. 213 // not found in the ICData.
214 if (!function.IsNull()) { 214 if (!function.IsNull()) {
215 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New( 215 const ICData& new_ic_data = ICData::ZoneHandle(Z, ICData::New(
216 Function::Handle(Z, ic_data.Owner()), 216 Function::Handle(Z, ic_data.Owner()),
217 String::Handle(Z, ic_data.target_name()), 217 String::Handle(Z, ic_data.target_name()),
218 Object::empty_array(), // Dummy argument descriptor. 218 Object::empty_array(), // Dummy argument descriptor.
219 ic_data.deopt_id(), 219 ic_data.deopt_id(),
220 ic_data.NumArgsTested())); 220 ic_data.NumArgsTested(),
221 false));
221 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons()); 222 new_ic_data.SetDeoptReasons(ic_data.DeoptReasons());
222 new_ic_data.AddReceiverCheck(cid, function); 223 new_ic_data.AddReceiverCheck(cid, function);
223 return new_ic_data; 224 return new_ic_data;
224 } 225 }
225 226
226 return ic_data; 227 return ic_data;
227 } 228 }
228 229
229 230
230 void JitOptimizer::SpecializePolymorphicInstanceCall( 231 void JitOptimizer::SpecializePolymorphicInstanceCall(
(...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 3083
3083 // Discard the environment from the original instruction because the store 3084 // Discard the environment from the original instruction because the store
3084 // can't deoptimize. 3085 // can't deoptimize.
3085 instr->RemoveEnvironment(); 3086 instr->RemoveEnvironment();
3086 ReplaceCall(instr, store); 3087 ReplaceCall(instr, store);
3087 return true; 3088 return true;
3088 } 3089 }
3089 3090
3090 3091
3091 } // namespace dart 3092 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698