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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 352 |
353 // Pop and save an element from the top of the expression stack and | 353 // Pop and save an element from the top of the expression stack and |
354 // emit a corresponding pop instruction. | 354 // emit a corresponding pop instruction. |
355 void EmitPop(Register reg); | 355 void EmitPop(Register reg); |
356 | 356 |
357 // Push an element on top of the expression stack and emit a | 357 // Push an element on top of the expression stack and emit a |
358 // corresponding push instruction. | 358 // corresponding push instruction. |
359 void EmitPush(Register reg); | 359 void EmitPush(Register reg); |
360 | 360 |
361 // Push an element on the virtual frame. | 361 // Push an element on the virtual frame. |
362 void Push(Register reg, StaticType static_type = StaticType()); | 362 void Push(Register reg); |
363 void Push(Handle<Object> value); | 363 void Push(Handle<Object> value); |
364 void Push(Smi* value) { Push(Handle<Object>(value)); } | 364 void Push(Smi* value) { Push(Handle<Object>(value)); } |
365 | 365 |
366 // Pushing a result invalidates it (its contents become owned by the frame). | 366 // Pushing a result invalidates it (its contents become owned by the frame). |
367 void Push(Result* result) { | 367 void Push(Result* result) { |
368 if (result->is_register()) { | 368 if (result->is_register()) { |
369 Push(result->reg(), result->static_type()); | 369 Push(result->reg()); |
370 } else { | 370 } else { |
371 ASSERT(result->is_constant()); | 371 ASSERT(result->is_constant()); |
372 Push(result->handle()); | 372 Push(result->handle()); |
373 } | 373 } |
374 result->Unuse(); | 374 result->Unuse(); |
375 } | 375 } |
376 | 376 |
377 // Nip removes zero or more elements from immediately below the top | 377 // Nip removes zero or more elements from immediately below the top |
378 // of the frame, leaving the previous top-of-frame value on top of | 378 // of the frame, leaving the previous top-of-frame value on top of |
379 // the frame. Nip(k) is equivalent to x = Pop(), Drop(k), Push(x). | 379 // the frame. Nip(k) is equivalent to x = Pop(), Drop(k), Push(x). |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 527 |
528 // Classes that need raw access to the elements_ array. | 528 // Classes that need raw access to the elements_ array. |
529 friend class DeferredCode; | 529 friend class DeferredCode; |
530 friend class JumpTarget; | 530 friend class JumpTarget; |
531 }; | 531 }; |
532 | 532 |
533 | 533 |
534 } } // namespace v8::internal | 534 } } // namespace v8::internal |
535 | 535 |
536 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ | 536 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ |
OLD | NEW |