| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 } | 66 } |
| 67 | 67 |
| 68 Result& operator=(const Result& other) { | 68 Result& operator=(const Result& other) { |
| 69 if (this != &other) { | 69 if (this != &other) { |
| 70 Unuse(); | 70 Unuse(); |
| 71 other.CopyTo(this); | 71 other.CopyTo(this); |
| 72 } | 72 } |
| 73 return *this; | 73 return *this; |
| 74 } | 74 } |
| 75 | 75 |
| 76 ~Result() { Unuse(); } | 76 inline ~Result(); |
| 77 | 77 |
| 78 void Unuse(); | 78 inline void Unuse(); |
| 79 | 79 |
| 80 Type type() const { return type_; } | 80 Type type() const { return type_; } |
| 81 | 81 |
| 82 bool is_valid() const { return type() != INVALID; } | 82 bool is_valid() const { return type() != INVALID; } |
| 83 bool is_register() const { return type() == REGISTER; } | 83 bool is_register() const { return type() == REGISTER; } |
| 84 bool is_constant() const { return type() == CONSTANT; } | 84 bool is_constant() const { return type() == CONSTANT; } |
| 85 | 85 |
| 86 Register reg() const { | 86 Register reg() const { |
| 87 ASSERT(type() == REGISTER); | 87 ASSERT(type() == REGISTER); |
| 88 return data_.reg_; | 88 return data_.reg_; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 | 239 |
| 240 private: | 240 private: |
| 241 CodeGenerator* cgen_; | 241 CodeGenerator* cgen_; |
| 242 RegisterFile registers_; | 242 RegisterFile registers_; |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 } } // namespace v8::internal | 245 } } // namespace v8::internal |
| 246 | 246 |
| 247 #endif // V8_REGISTER_ALLOCATOR_H_ | 247 #endif // V8_REGISTER_ALLOCATOR_H_ |
| OLD | NEW |