OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void ToRegister(); | 145 void ToRegister(); |
146 | 146 |
147 // Move this result to a specified register. The register is spilled from | 147 // Move this result to a specified register. The register is spilled from |
148 // the frame, and the register is singly-referenced (by this result) | 148 // the frame, and the register is singly-referenced (by this result) |
149 // outside the frame. | 149 // outside the frame. |
150 void ToRegister(Register reg); | 150 void ToRegister(Register reg); |
151 | 151 |
152 private: | 152 private: |
153 uint32_t value_; | 153 uint32_t value_; |
154 | 154 |
| 155 // Declare BitFields with template parameters <type, start, size>. |
155 class TypeField: public BitField<Type, 0, 2> {}; | 156 class TypeField: public BitField<Type, 0, 2> {}; |
156 class NumberInfoField : public BitField<int, 2, 4> {}; | 157 class NumberInfoField : public BitField<int, 2, 6> {}; |
157 class IsUntaggedInt32Field : public BitField<bool, 6, 1> {}; | 158 class IsUntaggedInt32Field : public BitField<bool, 8, 1> {}; |
158 class DataField: public BitField<uint32_t, 7, 32 - 7> {}; | 159 class DataField: public BitField<uint32_t, 9, 32 - 9> {}; |
159 | 160 |
160 inline void CopyTo(Result* destination) const; | 161 inline void CopyTo(Result* destination) const; |
161 | 162 |
162 friend class CodeGeneratorScope; | 163 friend class CodeGeneratorScope; |
163 }; | 164 }; |
164 | 165 |
165 | 166 |
166 // ------------------------------------------------------------------------- | 167 // ------------------------------------------------------------------------- |
167 // Register file | 168 // Register file |
168 // | 169 // |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } | 306 } |
306 | 307 |
307 private: | 308 private: |
308 CodeGenerator* cgen_; | 309 CodeGenerator* cgen_; |
309 RegisterFile registers_; | 310 RegisterFile registers_; |
310 }; | 311 }; |
311 | 312 |
312 } } // namespace v8::internal | 313 } } // namespace v8::internal |
313 | 314 |
314 #endif // V8_REGISTER_ALLOCATOR_H_ | 315 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |