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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Construct an initial virtual frame on entry to a JS function. | 61 // Construct an initial virtual frame on entry to a JS function. |
62 VirtualFrame(); | 62 VirtualFrame(); |
63 | 63 |
64 // Construct a virtual frame as a clone of an existing one. | 64 // Construct a virtual frame as a clone of an existing one. |
65 explicit VirtualFrame(VirtualFrame* original); | 65 explicit VirtualFrame(VirtualFrame* original); |
66 | 66 |
67 CodeGenerator* cgen() { return CodeGeneratorScope::Current(); } | 67 CodeGenerator* cgen() { return CodeGeneratorScope::Current(); } |
68 MacroAssembler* masm() { return cgen()->masm(); } | 68 MacroAssembler* masm() { return cgen()->masm(); } |
69 | 69 |
70 // Create a duplicate of an existing valid frame element. | 70 // Create a duplicate of an existing valid frame element. |
71 FrameElement CopyElementAt(int index); | 71 FrameElement CopyElementAt(int index, |
| 72 NumberInfo::Type info = NumberInfo::kUnknown); |
72 | 73 |
73 // The number of elements on the virtual frame. | 74 // The number of elements on the virtual frame. |
74 int element_count() { return elements_.length(); } | 75 int element_count() { return elements_.length(); } |
75 | 76 |
76 // The height of the virtual expression stack. | 77 // The height of the virtual expression stack. |
77 int height() { | 78 int height() { |
78 return element_count() - expression_base_index(); | 79 return element_count() - expression_base_index(); |
79 } | 80 } |
80 | 81 |
81 int register_location(int num) { | 82 int register_location(int num) { |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // Push an element on top of the expression stack and emit a | 337 // Push an element on top of the expression stack and emit a |
337 // corresponding push instruction. | 338 // corresponding push instruction. |
338 void EmitPush(Register reg); | 339 void EmitPush(Register reg); |
339 | 340 |
340 // Push multiple registers on the stack and the virtual frame | 341 // Push multiple registers on the stack and the virtual frame |
341 // Register are selected by setting bit in src_regs and | 342 // Register are selected by setting bit in src_regs and |
342 // are pushed in decreasing order: r15 .. r0. | 343 // are pushed in decreasing order: r15 .. r0. |
343 void EmitPushMultiple(int count, int src_regs); | 344 void EmitPushMultiple(int count, int src_regs); |
344 | 345 |
345 // Push an element on the virtual frame. | 346 // Push an element on the virtual frame. |
346 void Push(Register reg); | 347 void Push(Register reg, NumberInfo::Type info = NumberInfo::kUnknown); |
347 void Push(Handle<Object> value); | 348 void Push(Handle<Object> value); |
348 void Push(Smi* value) { Push(Handle<Object>(value)); } | 349 void Push(Smi* value) { Push(Handle<Object>(value)); } |
349 | 350 |
350 // Pushing a result invalidates it (its contents become owned by the frame). | 351 // Pushing a result invalidates it (its contents become owned by the frame). |
351 void Push(Result* result) { | 352 void Push(Result* result) { |
352 if (result->is_register()) { | 353 if (result->is_register()) { |
353 Push(result->reg()); | 354 Push(result->reg()); |
354 } else { | 355 } else { |
355 ASSERT(result->is_constant()); | 356 ASSERT(result->is_constant()); |
356 Push(result->handle()); | 357 Push(result->handle()); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 504 |
504 // Classes that need raw access to the elements_ array. | 505 // Classes that need raw access to the elements_ array. |
505 friend class DeferredCode; | 506 friend class DeferredCode; |
506 friend class JumpTarget; | 507 friend class JumpTarget; |
507 }; | 508 }; |
508 | 509 |
509 | 510 |
510 } } // namespace v8::internal | 511 } } // namespace v8::internal |
511 | 512 |
512 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ | 513 #endif // V8_ARM_VIRTUAL_FRAME_ARM_H_ |
OLD | NEW |