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

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

Issue 10790086: Minor cleanups: use GrowableArray::is_empty instead of ::length() == 0 (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/exceptions.cc ('k') | runtime/vm/flow_graph_compiler.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) 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_FLOW_GRAPH_COMPILER_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_
6 #define VM_FLOW_GRAPH_COMPILER_H_ 6 #define VM_FLOW_GRAPH_COMPILER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Perform a greedy local register allocation. Consider all register free. 51 // Perform a greedy local register allocation. Consider all register free.
52 void AllocateRegisters(Instruction* instr); 52 void AllocateRegisters(Instruction* instr);
53 53
54 // Spill all live registers to the stack in order from oldest to newest. 54 // Spill all live registers to the stack in order from oldest to newest.
55 void Spill(); 55 void Spill();
56 56
57 // Returns true if all live values are stored on the stack. 57 // Returns true if all live values are stored on the stack.
58 // Code generator expects no live values in registers at call sites and 58 // Code generator expects no live values in registers at call sites and
59 // branches. 59 // branches.
60 bool IsSpilled() const { return stack_.length() == 0; } 60 bool IsSpilled() const { return stack_.is_empty(); }
61 61
62 // Popuplate deoptimization stub with live registers to ensure 62 // Popuplate deoptimization stub with live registers to ensure
63 // that they will be pushed to the stack when deoptimization happens. 63 // that they will be pushed to the stack when deoptimization happens.
64 void SpillInDeoptStub(DeoptimizationStub* stub); 64 void SpillInDeoptStub(DeoptimizationStub* stub);
65 65
66 private: 66 private:
67 // Pop a value from the place where it is currently stored (either register 67 // Pop a value from the place where it is currently stored (either register
68 // or top of the stack) into a given register. If value is in the register 68 // or top of the stack) into a given register. If value is in the register
69 // verify that passed use corresponds to the instruction that produced the 69 // verify that passed use corresponds to the instruction that produced the
70 // value. 70 // value.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 #include "vm/flow_graph_compiler_ia32.h" 172 #include "vm/flow_graph_compiler_ia32.h"
173 #elif defined(TARGET_ARCH_X64) 173 #elif defined(TARGET_ARCH_X64)
174 #include "vm/flow_graph_compiler_x64.h" 174 #include "vm/flow_graph_compiler_x64.h"
175 #elif defined(TARGET_ARCH_ARM) 175 #elif defined(TARGET_ARCH_ARM)
176 #include "vm/flow_graph_compiler_arm.h" 176 #include "vm/flow_graph_compiler_arm.h"
177 #else 177 #else
178 #error Unknown architecture. 178 #error Unknown architecture.
179 #endif 179 #endif
180 180
181 #endif // VM_FLOW_GRAPH_COMPILER_H_ 181 #endif // VM_FLOW_GRAPH_COMPILER_H_
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698