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

Side by Side Diff: runtime/vm/intermediate_language.h

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/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.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 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 2775 matching lines...) Expand 10 before | Expand all | Expand 10 after
2786 PolymorphicInstanceCallInstr(InstanceCallInstr* instance_call, 2786 PolymorphicInstanceCallInstr(InstanceCallInstr* instance_call,
2787 const ICData& ic_data, 2787 const ICData& ic_data,
2788 bool with_checks, 2788 bool with_checks,
2789 bool complete) 2789 bool complete)
2790 : TemplateDefinition(instance_call->deopt_id()), 2790 : TemplateDefinition(instance_call->deopt_id()),
2791 instance_call_(instance_call), 2791 instance_call_(instance_call),
2792 ic_data_(ic_data), 2792 ic_data_(ic_data),
2793 with_checks_(with_checks), 2793 with_checks_(with_checks),
2794 complete_(complete) { 2794 complete_(complete) {
2795 ASSERT(instance_call_ != NULL); 2795 ASSERT(instance_call_ != NULL);
2796 ASSERT(ic_data.NumberOfChecks() > 0); 2796 ASSERT(!ic_data.NumberOfChecksIs(0));
2797 } 2797 }
2798 2798
2799 InstanceCallInstr* instance_call() const { return instance_call_; } 2799 InstanceCallInstr* instance_call() const { return instance_call_; }
2800 bool with_checks() const { return with_checks_; } 2800 bool with_checks() const { return with_checks_; }
2801 void set_with_checks(bool b) { with_checks_ = b; } 2801 void set_with_checks(bool b) { with_checks_ = b; }
2802 bool complete() const { return complete_; } 2802 bool complete() const { return complete_; }
2803 virtual TokenPosition token_pos() const { 2803 virtual TokenPosition token_pos() const {
2804 return instance_call_->token_pos(); 2804 return instance_call_->token_pos();
2805 } 2805 }
2806 2806
(...skipping 5236 matching lines...) Expand 10 before | Expand all | Expand 10 after
8043 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8043 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8044 UNIMPLEMENTED(); \ 8044 UNIMPLEMENTED(); \
8045 return NULL; \ 8045 return NULL; \
8046 } \ 8046 } \
8047 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8047 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8048 8048
8049 8049
8050 } // namespace dart 8050 } // namespace dart
8051 8051
8052 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 8052 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698