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

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

Issue 10832292: Reduce space used for stackmaps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Restore inadvertently deleted code. Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const GrowableArray<BlockEntryInstr*>& block_order, 80 const GrowableArray<BlockEntryInstr*>& block_order,
81 bool is_optimizing, 81 bool is_optimizing,
82 bool is_ssa, 82 bool is_ssa,
83 bool is_leaf) 83 bool is_leaf)
84 : assembler_(assembler), 84 : assembler_(assembler),
85 parsed_function_(parsed_function), 85 parsed_function_(parsed_function),
86 block_order_(block_order), 86 block_order_(block_order),
87 current_block_(NULL), 87 current_block_(NULL),
88 exception_handlers_list_(NULL), 88 exception_handlers_list_(NULL),
89 pc_descriptors_list_(NULL), 89 pc_descriptors_list_(NULL),
90 stackmap_table_builder_(is_ssa ? new StackmapTableBuilder() : NULL), 90 stackmap_table_builder_(NULL),
91 block_info_(block_order.length()), 91 block_info_(block_order.length()),
92 deopt_stubs_(), 92 deopt_stubs_(),
93 object_table_(GrowableObjectArray::Handle(GrowableObjectArray::New())), 93 object_table_(GrowableObjectArray::Handle(GrowableObjectArray::New())),
94 is_optimizing_(is_optimizing), 94 is_optimizing_(is_optimizing),
95 is_ssa_(is_ssa), 95 is_ssa_(is_ssa),
96 is_dart_leaf_(is_leaf), 96 is_dart_leaf_(is_leaf),
97 bool_true_(Bool::ZoneHandle(Bool::True())), 97 bool_true_(Bool::ZoneHandle(Bool::True())),
98 bool_false_(Bool::ZoneHandle(Bool::False())), 98 bool_false_(Bool::ZoneHandle(Bool::False())),
99 double_class_(Class::ZoneHandle( 99 double_class_(Class::ZoneHandle(
100 Isolate::Current()->object_store()->double_class())), 100 Isolate::Current()->object_store()->double_class())),
101 frame_register_allocator_(this, is_optimizing, is_ssa), 101 frame_register_allocator_(this, is_optimizing, is_ssa),
102 parallel_move_resolver_(this) { 102 parallel_move_resolver_(this) {
103 ASSERT(assembler != NULL); 103 ASSERT(assembler != NULL);
104 ASSERT(is_optimizing_ || !is_ssa_); 104 ASSERT(is_optimizing_ || !is_ssa_);
105 if (is_ssa_) {
106 stackmap_table_builder_ = new StackmapTableBuilder(StackSize());
107 }
105 } 108 }
106 109
107 110
108 FlowGraphCompiler::~FlowGraphCompiler() { 111 FlowGraphCompiler::~FlowGraphCompiler() {
109 // BlockInfos are zone-allocated, so their destructors are not called. 112 // BlockInfos are zone-allocated, so their destructors are not called.
110 // Verify the labels explicitly here. 113 // Verify the labels explicitly here.
111 for (int i = 0; i < block_info_.length(); ++i) { 114 for (int i = 0; i < block_info_.length(); ++i) {
112 ASSERT(!block_info_[i]->label.IsLinked()); 115 ASSERT(!block_info_[i]->label.IsLinked());
113 ASSERT(!block_info_[i]->label.HasNear()); 116 ASSERT(!block_info_[i]->label.HasNear());
114 } 117 }
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 return; 871 return;
869 } 872 }
870 } 873 }
871 874
872 // This move is not blocked. 875 // This move is not blocked.
873 EmitMove(index); 876 EmitMove(index);
874 } 877 }
875 878
876 879
877 } // namespace dart 880 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698