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

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

Issue 10800080: Add higher-level accesses to Environment. Print flow graph after register allocation. Most interest… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « runtime/vm/flow_graph_optimizer.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 2464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 // during register allocation. 2475 // during register allocation.
2476 explicit Environment(const GrowableArray<Value*>& values) 2476 explicit Environment(const GrowableArray<Value*>& values)
2477 : values_(values.length()), locations_(values.length()) { 2477 : values_(values.length()), locations_(values.length()) {
2478 values_.AddArray(values); 2478 values_.AddArray(values);
2479 } 2479 }
2480 2480
2481 const GrowableArray<Value*>& values() const { 2481 const GrowableArray<Value*>& values() const {
2482 return values_; 2482 return values_;
2483 } 2483 }
2484 2484
2485 GrowableArray<Location>* locations() { 2485 void AddLocation(Location value) {
2486 return &locations_; 2486 locations_.Add(value);
2487 } 2487 }
2488 2488
2489 const GrowableArray<Location>* locations() const { 2489 Location LocationAt(intptr_t ix) const {
2490 return &locations_; 2490 return locations_[ix];
2491 }
2492
2493 Location* LocationSlotAt(intptr_t ix) const {
2494 return & locations_[ix];
2491 } 2495 }
2492 2496
2493 void PrintTo(BufferFormatter* f) const; 2497 void PrintTo(BufferFormatter* f) const;
2494 2498
2495 private: 2499 private:
2496 GrowableArray<Value*> values_; 2500 GrowableArray<Value*> values_;
2497 GrowableArray<Location> locations_; 2501 GrowableArray<Location> locations_;
2498 DISALLOW_COPY_AND_ASSIGN(Environment); 2502 DISALLOW_COPY_AND_ASSIGN(Environment);
2499 }; 2503 };
2500 2504
(...skipping 28 matching lines...) Expand all
2529 const GrowableArray<BlockEntryInstr*>& block_order_; 2533 const GrowableArray<BlockEntryInstr*>& block_order_;
2530 2534
2531 private: 2535 private:
2532 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 2536 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
2533 }; 2537 };
2534 2538
2535 2539
2536 } // namespace dart 2540 } // namespace dart
2537 2541
2538 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 2542 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698