Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 // frame. As a side effect, code may be emitted to make this frame match | 182 // frame. As a side effect, code may be emitted to make this frame match |
| 183 // the expected one. | 183 // the expected one. |
| 184 void MergeTo(VirtualFrame* expected, Condition cond = al); | 184 void MergeTo(VirtualFrame* expected, Condition cond = al); |
| 185 void MergeTo(const VirtualFrame* expected, Condition cond = al); | 185 void MergeTo(const VirtualFrame* expected, Condition cond = al); |
| 186 | 186 |
| 187 // Checks whether this frame can be branched to by the other frame. | 187 // Checks whether this frame can be branched to by the other frame. |
| 188 bool IsCompatibleWith(const VirtualFrame* other) const { | 188 bool IsCompatibleWith(const VirtualFrame* other) const { |
| 189 return (tos_known_smi_map_ & (~other->tos_known_smi_map_)) == 0; | 189 return (tos_known_smi_map_ & (~other->tos_known_smi_map_)) == 0; |
| 190 } | 190 } |
| 191 | 191 |
| 192 inline void ForgetTypeInfo() { | |
| 193 tos_known_smi_map_ = 0; | |
| 194 } | |
| 195 | |
| 192 // Detach a frame from its code generator, perhaps temporarily. This | 196 // Detach a frame from its code generator, perhaps temporarily. This |
| 193 // tells the register allocator that it is free to use frame-internal | 197 // tells the register allocator that it is free to use frame-internal |
| 194 // registers. Used when the code generator's frame is switched from this | 198 // registers. Used when the code generator's frame is switched from this |
| 195 // one to NULL by an unconditional jump. | 199 // one to NULL by an unconditional jump. |
| 196 void DetachFromCodeGenerator() { | 200 void DetachFromCodeGenerator() { |
| 197 AssertIsSpilled(); | |
| 198 } | 201 } |
| 199 | 202 |
| 200 // (Re)attach a frame to its code generator. This informs the register | 203 // (Re)attach a frame to its code generator. This informs the register |
| 201 // allocator that the frame-internal register references are active again. | 204 // allocator that the frame-internal register references are active again. |
| 202 // Used when a code generator's frame is switched from NULL to this one by | 205 // Used when a code generator's frame is switched from NULL to this one by |
| 203 // binding a label. | 206 // binding a label. |
| 204 void AttachToCodeGenerator() { | 207 void AttachToCodeGenerator() { |
| 205 AssertIsSpilled(); | |
| 206 } | 208 } |
| 207 | 209 |
| 208 // Emit code for the physical JS entry and exit frame sequences. After | 210 // Emit code for the physical JS entry and exit frame sequences. After |
| 209 // calling Enter, the virtual frame is ready for use; and after calling | 211 // calling Enter, the virtual frame is ready for use; and after calling |
| 210 // Exit it should not be used. Note that Enter does not allocate space in | 212 // Exit it should not be used. Note that Enter does not allocate space in |
| 211 // the physical frame for storing frame-allocated locals. | 213 // the physical frame for storing frame-allocated locals. |
| 212 void Enter(); | 214 void Enter(); |
| 213 void Exit(); | 215 void Exit(); |
| 214 | 216 |
| 215 // Prepare for returning from the frame by elements in the virtual frame. This | 217 // Prepare for returning from the frame by elements in the virtual frame. This |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 323 | 325 |
| 324 // Pop an element from the top of the expression stack. The register | 326 // Pop an element from the top of the expression stack. The register |
| 325 // will be one normally used for the top of stack register allocation | 327 // will be one normally used for the top of stack register allocation |
| 326 // so you can't hold on to it if you push on the stack. | 328 // so you can't hold on to it if you push on the stack. |
| 327 Register PopToRegister(Register but_not_to_this_one = no_reg); | 329 Register PopToRegister(Register but_not_to_this_one = no_reg); |
| 328 | 330 |
| 329 // Look at the top of the stack. The register returned is aliased and | 331 // Look at the top of the stack. The register returned is aliased and |
| 330 // must be copied to a scratch register before modification. | 332 // must be copied to a scratch register before modification. |
| 331 Register Peek(); | 333 Register Peek(); |
| 332 | 334 |
| 335 // Look at the value beneath the top of the stack. The register returned is | |
| 336 // aliased and must be copied to a scratch register before modification. | |
| 337 Register Peek2(); | |
| 338 | |
| 333 // Duplicate the top of stack. | 339 // Duplicate the top of stack. |
| 334 void Dup(); | 340 void Dup(); |
| 335 | 341 |
| 336 // Duplicate the two elements on top of stack. | 342 // Duplicate the two elements on top of stack. |
| 337 void Dup2(); | 343 void Dup2(); |
| 338 | 344 |
| 339 // Flushes all registers, but it puts a copy of the top-of-stack in r0. | 345 // Flushes all registers, but it puts a copy of the top-of-stack in r0. |
| 340 void SpillAllButCopyTOSToR0(); | 346 void SpillAllButCopyTOSToR0(); |
| 341 | 347 |
| 348 // Flushes all registers, but it puts a copy of the top-of-stack in r0. | |
|
Søren Thygesen Gjesse
2010/06/15 10:29:56
r0 -> r1
| |
| 349 void SpillAllButCopyTOSToR1(); | |
| 350 | |
| 342 // Flushes all registers, but it puts a copy of the top-of-stack in r1 | 351 // Flushes all registers, but it puts a copy of the top-of-stack in r1 |
| 343 // and the next value on the stack in r0. | 352 // and the next value on the stack in r0. |
| 344 void SpillAllButCopyTOSToR1R0(); | 353 void SpillAllButCopyTOSToR1R0(); |
| 345 | 354 |
| 346 // Pop and save an element from the top of the expression stack and | 355 // Pop and save an element from the top of the expression stack and |
| 347 // emit a corresponding pop instruction. | 356 // emit a corresponding pop instruction. |
| 348 void EmitPop(Register reg); | 357 void EmitPop(Register reg); |
| 349 | 358 |
| 350 // Takes the top two elements and puts them in r0 (top element) and r1 | 359 // Takes the top two elements and puts them in r0 (top element) and r1 |
| 351 // (second element). | 360 // (second element). |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 } | 510 } |
| 502 } | 511 } |
| 503 | 512 |
| 504 friend class JumpTarget; | 513 friend class JumpTarget; |
| 505 }; | 514 }; |
| 506 | 515 |
| 507 | 516 |
| 508 } } // namespace v8::internal | 517 } } // namespace v8::internal |
| 509 | 518 |
| 510 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ | 519 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ |
| OLD | NEW |