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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 4588 matching lines...) Expand 10 before | Expand all | Expand 10 after
4599 // Check for overflow and that it fits into Smi. 4599 // Check for overflow and that it fits into Smi.
4600 __ LoadImmediate(TMP, 0xC0000000); 4600 __ LoadImmediate(TMP, 0xC0000000);
4601 __ subu(CMPRES1, result, TMP); 4601 __ subu(CMPRES1, result, TMP);
4602 __ bltz(CMPRES1, &do_call); 4602 __ bltz(CMPRES1, &do_call);
4603 __ SmiTag(result); 4603 __ SmiTag(result);
4604 __ b(&done); 4604 __ b(&done);
4605 __ Bind(&do_call); 4605 __ Bind(&do_call);
4606 __ Push(value_obj); 4606 __ Push(value_obj);
4607 ASSERT(instance_call()->HasICData()); 4607 ASSERT(instance_call()->HasICData());
4608 const ICData& ic_data = *instance_call()->ic_data(); 4608 const ICData& ic_data = *instance_call()->ic_data();
4609 ASSERT((ic_data.NumberOfChecks() == 1)); 4609 ASSERT(ic_data.NumberOfChecksIs(1));
4610 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); 4610 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0));
4611 4611
4612 const intptr_t kNumberOfArguments = 1; 4612 const intptr_t kNumberOfArguments = 1;
4613 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target, 4613 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), target,
4614 kNumberOfArguments, 4614 kNumberOfArguments,
4615 Object::null_array(), // No argument names. 4615 Object::null_array(), // No argument names.
4616 locs(), ICData::Handle()); 4616 locs(), ICData::Handle());
4617 __ Bind(&done); 4617 __ Bind(&done);
4618 } 4618 }
4619 4619
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
6011 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 6011 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
6012 kGrowRegExpStackRuntimeEntry, 1, locs()); 6012 kGrowRegExpStackRuntimeEntry, 1, locs());
6013 __ lw(result, Address(SP, 1 * kWordSize)); 6013 __ lw(result, Address(SP, 1 * kWordSize));
6014 __ addiu(SP, SP, Immediate(2 * kWordSize)); 6014 __ addiu(SP, SP, Immediate(2 * kWordSize));
6015 } 6015 }
6016 6016
6017 6017
6018 } // namespace dart 6018 } // namespace dart
6019 6019
6020 #endif // defined TARGET_ARCH_MIPS 6020 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698