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

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

Issue 2734883002: ICData::NumberOfChecks is O(n) so don't call it in loops (Closed)
Patch Set: Add const Created 3 years, 9 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/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.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 1
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
7 #if defined(TARGET_ARCH_ARM) 7 #if defined(TARGET_ARCH_ARM)
8 8
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 10
(...skipping 5803 matching lines...) Expand 10 before | Expand all | Expand 10 after
5814 5814
5815 // Check for overflow and that it fits into Smi. 5815 // Check for overflow and that it fits into Smi.
5816 __ CompareImmediate(result, 0xC0000000); 5816 __ CompareImmediate(result, 0xC0000000);
5817 __ SmiTag(result, PL); 5817 __ SmiTag(result, PL);
5818 __ b(&done, PL); 5818 __ b(&done, PL);
5819 5819
5820 __ Bind(&do_call); 5820 __ Bind(&do_call);
5821 __ Push(value_obj); 5821 __ Push(value_obj);
5822 ASSERT(instance_call()->HasICData()); 5822 ASSERT(instance_call()->HasICData());
5823 const ICData& ic_data = *instance_call()->ic_data(); 5823 const ICData& ic_data = *instance_call()->ic_data();
5824 ASSERT((ic_data.NumberOfChecks() == 1)); 5824 ASSERT(ic_data.NumberOfChecksIs(1));
5825 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); 5825 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0));
5826 5826
5827 const intptr_t kNumberOfArguments = 1; 5827 const intptr_t kNumberOfArguments = 1;
5828 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, 5828 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target,
5829 kNumberOfArguments, 5829 kNumberOfArguments,
5830 Object::null_array(), // No argument names., 5830 Object::null_array(), // No argument names.,
5831 locs(), ICData::Handle()); 5831 locs(), ICData::Handle());
5832 __ Bind(&done); 5832 __ Bind(&done);
5833 } 5833 }
5834 5834
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
7226 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 7226 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
7227 kGrowRegExpStackRuntimeEntry, 1, locs()); 7227 kGrowRegExpStackRuntimeEntry, 1, locs());
7228 __ Drop(1); 7228 __ Drop(1);
7229 __ Pop(result); 7229 __ Pop(result);
7230 } 7230 }
7231 7231
7232 7232
7233 } // namespace dart 7233 } // namespace dart
7234 7234
7235 #endif // defined TARGET_ARCH_ARM 7235 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698