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

Side by Side Diff: runtime/vm/intermediate_language_arm64.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_arm.cc ('k') | runtime/vm/intermediate_language_ia32.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 5009 matching lines...) Expand 10 before | Expand all | Expand 10 after
5020 5020
5021 // Check for overflow and that it fits into Smi. 5021 // Check for overflow and that it fits into Smi.
5022 __ CompareImmediate(result, 0xC000000000000000); 5022 __ CompareImmediate(result, 0xC000000000000000);
5023 __ b(&do_call, MI); 5023 __ b(&do_call, MI);
5024 __ SmiTag(result); 5024 __ SmiTag(result);
5025 __ b(&done); 5025 __ b(&done);
5026 __ Bind(&do_call); 5026 __ Bind(&do_call);
5027 __ Push(value_obj); 5027 __ Push(value_obj);
5028 ASSERT(instance_call()->HasICData()); 5028 ASSERT(instance_call()->HasICData());
5029 const ICData& ic_data = *instance_call()->ic_data(); 5029 const ICData& ic_data = *instance_call()->ic_data();
5030 ASSERT((ic_data.NumberOfChecks() == 1)); 5030 ASSERT(ic_data.NumberOfChecksIs(1));
5031 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); 5031 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0));
5032 5032
5033 const intptr_t kNumberOfArguments = 1; 5033 const intptr_t kNumberOfArguments = 1;
5034 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, 5034 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target,
5035 kNumberOfArguments, 5035 kNumberOfArguments,
5036 Object::null_array(), // No argument names., 5036 Object::null_array(), // No argument names.,
5037 locs(), ICData::Handle()); 5037 locs(), ICData::Handle());
5038 __ Bind(&done); 5038 __ Bind(&done);
5039 } 5039 }
5040 5040
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
6019 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 6019 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
6020 kGrowRegExpStackRuntimeEntry, 1, locs()); 6020 kGrowRegExpStackRuntimeEntry, 1, locs());
6021 __ Drop(1); 6021 __ Drop(1);
6022 __ Pop(result); 6022 __ Pop(result);
6023 } 6023 }
6024 6024
6025 6025
6026 } // namespace dart 6026 } // namespace dart
6027 6027
6028 #endif // defined TARGET_ARCH_ARM64 6028 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698