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

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

Issue 333403002: Cleanup: use a ZoneGrowableArray instead of Array for ICData map. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_inliner.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 VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 825
826 virtual ~Instruction() { } 826 virtual ~Instruction() { }
827 827
828 virtual Tag tag() const = 0; 828 virtual Tag tag() const = 0;
829 829
830 intptr_t deopt_id() const { 830 intptr_t deopt_id() const {
831 ASSERT(CanDeoptimize() || CanBecomeDeoptimizationTarget()); 831 ASSERT(CanDeoptimize() || CanBecomeDeoptimizationTarget());
832 return deopt_id_; 832 return deopt_id_;
833 } 833 }
834 834
835 ICData* GetICData(const Array& ic_data_array) const; 835 const ICData* GetICData(
836 const ZoneGrowableArray<const ICData*>& ic_data_array) const;
836 837
837 bool IsBlockEntry() { return (AsBlockEntry() != NULL); } 838 bool IsBlockEntry() { return (AsBlockEntry() != NULL); }
838 virtual BlockEntryInstr* AsBlockEntry() { return NULL; } 839 virtual BlockEntryInstr* AsBlockEntry() { return NULL; }
839 840
840 bool IsDefinition() { return (AsDefinition() != NULL); } 841 bool IsDefinition() { return (AsDefinition() != NULL); }
841 virtual Definition* AsDefinition() { return NULL; } 842 virtual Definition* AsDefinition() { return NULL; }
842 843
843 virtual intptr_t token_pos() const { return Scanner::kNoSourcePos; } 844 virtual intptr_t token_pos() const { return Scanner::kNoSourcePos; }
844 845
845 virtual intptr_t InputCount() const = 0; 846 virtual intptr_t InputCount() const = 0;
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2965 2966
2966 2967
2967 class InstanceCallInstr : public TemplateDefinition<0> { 2968 class InstanceCallInstr : public TemplateDefinition<0> {
2968 public: 2969 public:
2969 InstanceCallInstr(intptr_t token_pos, 2970 InstanceCallInstr(intptr_t token_pos,
2970 const String& function_name, 2971 const String& function_name,
2971 Token::Kind token_kind, 2972 Token::Kind token_kind,
2972 ZoneGrowableArray<PushArgumentInstr*>* arguments, 2973 ZoneGrowableArray<PushArgumentInstr*>* arguments,
2973 const Array& argument_names, 2974 const Array& argument_names,
2974 intptr_t checked_argument_count, 2975 intptr_t checked_argument_count,
2975 const Array& ic_data_array) 2976 const ZoneGrowableArray<const ICData*>& ic_data_array)
2976 : ic_data_(GetICData(ic_data_array)), 2977 : ic_data_(GetICData(ic_data_array)),
2977 token_pos_(token_pos), 2978 token_pos_(token_pos),
2978 function_name_(function_name), 2979 function_name_(function_name),
2979 token_kind_(token_kind), 2980 token_kind_(token_kind),
2980 arguments_(arguments), 2981 arguments_(arguments),
2981 argument_names_(argument_names), 2982 argument_names_(argument_names),
2982 checked_argument_count_(checked_argument_count) { 2983 checked_argument_count_(checked_argument_count) {
2983 ASSERT(function_name.IsNotTemporaryScopedHandle()); 2984 ASSERT(function_name.IsNotTemporaryScopedHandle());
2984 ASSERT(!arguments->is_empty()); 2985 ASSERT(!arguments->is_empty());
2985 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap()); 2986 ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap());
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 DISALLOW_COPY_AND_ASSIGN(IfThenElseInstr); 3446 DISALLOW_COPY_AND_ASSIGN(IfThenElseInstr);
3446 }; 3447 };
3447 3448
3448 3449
3449 class StaticCallInstr : public TemplateDefinition<0> { 3450 class StaticCallInstr : public TemplateDefinition<0> {
3450 public: 3451 public:
3451 StaticCallInstr(intptr_t token_pos, 3452 StaticCallInstr(intptr_t token_pos,
3452 const Function& function, 3453 const Function& function,
3453 const Array& argument_names, 3454 const Array& argument_names,
3454 ZoneGrowableArray<PushArgumentInstr*>* arguments, 3455 ZoneGrowableArray<PushArgumentInstr*>* arguments,
3455 const Array& ic_data_array) 3456 const ZoneGrowableArray<const ICData*>& ic_data_array)
3456 : ic_data_(GetICData(ic_data_array)), 3457 : ic_data_(GetICData(ic_data_array)),
3457 token_pos_(token_pos), 3458 token_pos_(token_pos),
3458 function_(function), 3459 function_(function),
3459 argument_names_(argument_names), 3460 argument_names_(argument_names),
3460 arguments_(arguments), 3461 arguments_(arguments),
3461 result_cid_(kDynamicCid), 3462 result_cid_(kDynamicCid),
3462 is_known_list_constructor_(false), 3463 is_known_list_constructor_(false),
3463 is_native_list_factory_(false), 3464 is_native_list_factory_(false),
3464 identity_(kIdentityUnknown) { 3465 identity_(kIdentityUnknown) {
3465 ASSERT(function.IsZoneHandle()); 3466 ASSERT(function.IsZoneHandle());
(...skipping 4571 matching lines...) Expand 10 before | Expand all | Expand 10 after
8037 ForwardInstructionIterator* current_iterator_; 8038 ForwardInstructionIterator* current_iterator_;
8038 8039
8039 private: 8040 private:
8040 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 8041 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
8041 }; 8042 };
8042 8043
8043 8044
8044 } // namespace dart 8045 } // namespace dart
8045 8046
8046 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8047 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698