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

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

Issue 10692140: Cleanup usage of GrowableArrays in class Environment. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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_builder.cc ('k') | no next file » | 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) 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 #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 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 2356
2357 DISALLOW_COPY_AND_ASSIGN(ParallelMoveInstr); 2357 DISALLOW_COPY_AND_ASSIGN(ParallelMoveInstr);
2358 }; 2358 };
2359 2359
2360 #undef DECLARE_INSTRUCTION 2360 #undef DECLARE_INSTRUCTION
2361 2361
2362 2362
2363 class Environment : public ZoneAllocated { 2363 class Environment : public ZoneAllocated {
2364 public: 2364 public:
2365 // Construct an environment by copying from an array of values. 2365 // Construct an environment by copying from an array of values.
2366 explicit Environment(ZoneGrowableArray<Value*>* values) 2366 explicit Environment(const GrowableArray<Value*>& values)
2367 : values_(values->length()) { 2367 : values_(values.length()) {
2368 values_.AddArray(*values); 2368 values_.AddArray(values);
2369 } 2369 }
2370 2370
2371 const ZoneGrowableArray<Value*>& values() const { 2371 const GrowableArray<Value*>& values() const {
2372 return values_; 2372 return values_;
2373 } 2373 }
2374 2374
2375 void PrintTo(BufferFormatter* f) const; 2375 void PrintTo(BufferFormatter* f) const;
2376 2376
2377 private: 2377 private:
2378 ZoneGrowableArray<Value*> values_; 2378 GrowableArray<Value*> values_;
2379 DISALLOW_COPY_AND_ASSIGN(Environment); 2379 DISALLOW_COPY_AND_ASSIGN(Environment);
2380 }; 2380 };
2381 2381
2382 2382
2383 // Visitor base class to visit each instruction and computation in a flow 2383 // Visitor base class to visit each instruction and computation in a flow
2384 // graph as defined by a reversed list of basic blocks. 2384 // graph as defined by a reversed list of basic blocks.
2385 class FlowGraphVisitor : public ValueObject { 2385 class FlowGraphVisitor : public ValueObject {
2386 public: 2386 public:
2387 explicit FlowGraphVisitor(const GrowableArray<BlockEntryInstr*>& block_order) 2387 explicit FlowGraphVisitor(const GrowableArray<BlockEntryInstr*>& block_order)
2388 : block_order_(block_order) { } 2388 : block_order_(block_order) { }
(...skipping 21 matching lines...) Expand all
2410 const GrowableArray<BlockEntryInstr*>& block_order_; 2410 const GrowableArray<BlockEntryInstr*>& block_order_;
2411 2411
2412 private: 2412 private:
2413 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 2413 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
2414 }; 2414 };
2415 2415
2416 2416
2417 } // namespace dart 2417 } // namespace dart
2418 2418
2419 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 2419 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698