| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void Unuse(Register reg) { registers_.Unuse(reg); } | 94 void Unuse(Register reg) { registers_.Unuse(reg); } |
| 95 | 95 |
| 96 // Initialize the register allocator for entry to a JS function. On | 96 // Initialize the register allocator for entry to a JS function. On |
| 97 // entry, esp, ebp, esi, and edi are externally referenced (ie, outside | 97 // entry, esp, ebp, esi, and edi are externally referenced (ie, outside |
| 98 // the virtual frame); and the other registers are free. | 98 // the virtual frame); and the other registers are free. |
| 99 void Initialize(); | 99 void Initialize(); |
| 100 | 100 |
| 101 // Allocate a free register if possible or fail by returning no_reg. | 101 // Allocate a free register if possible or fail by returning no_reg. |
| 102 Register Allocate(); | 102 Register Allocate(); |
| 103 | 103 |
| 104 // Allocate a free register without spilling any or fail and return |
| 105 // no_reg. |
| 106 Register AllocateWithoutSpilling(); |
| 107 |
| 104 private: | 108 private: |
| 105 CodeGenerator* code_generator_; | 109 CodeGenerator* code_generator_; |
| 106 RegisterFile registers_; | 110 RegisterFile registers_; |
| 107 }; | 111 }; |
| 108 | 112 |
| 109 } } // namespace v8::internal | 113 } } // namespace v8::internal |
| 110 | 114 |
| 111 #endif // V8_REGISTER_ALLOCATOR_IA32_H_ | 115 #endif // V8_REGISTER_ALLOCATOR_IA32_H_ |
| OLD | NEW |