OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 #include "codegen-inl.h" | 36 #include "codegen-inl.h" |
37 #include "jump-target-light-inl.h" | 37 #include "jump-target-light-inl.h" |
38 | 38 |
39 namespace v8 { | 39 namespace v8 { |
40 namespace internal { | 40 namespace internal { |
41 | 41 |
42 VirtualFrame::VirtualFrame(InvalidVirtualFrameInitializer* dummy) | 42 VirtualFrame::VirtualFrame(InvalidVirtualFrameInitializer* dummy) |
43 : element_count_(0), | 43 : element_count_(0), |
44 top_of_stack_state_(NO_TOS_REGISTERS), | 44 top_of_stack_state_(NO_TOS_REGISTERS), |
45 register_allocation_map_(0) { } | 45 register_allocation_map_(0), |
| 46 tos_known_smi_map_(0) { } |
46 | 47 |
47 | 48 |
48 // On entry to a function, the virtual frame already contains the receiver, | 49 // On entry to a function, the virtual frame already contains the receiver, |
49 // the parameters, and a return address. All frame elements are in memory. | 50 // the parameters, and a return address. All frame elements are in memory. |
50 VirtualFrame::VirtualFrame() | 51 VirtualFrame::VirtualFrame() |
51 : element_count_(parameter_count() + 2), | 52 : element_count_(parameter_count() + 2), |
52 top_of_stack_state_(NO_TOS_REGISTERS), | 53 top_of_stack_state_(NO_TOS_REGISTERS), |
53 register_allocation_map_(0) { } | 54 register_allocation_map_(0), |
| 55 tos_known_smi_map_(0) { } |
54 | 56 |
55 | 57 |
56 // When cloned, a frame is a deep copy of the original. | 58 // When cloned, a frame is a deep copy of the original. |
57 VirtualFrame::VirtualFrame(VirtualFrame* original) | 59 VirtualFrame::VirtualFrame(VirtualFrame* original) |
58 : element_count_(original->element_count()), | 60 : element_count_(original->element_count()), |
59 top_of_stack_state_(original->top_of_stack_state_), | 61 top_of_stack_state_(original->top_of_stack_state_), |
60 register_allocation_map_(original->register_allocation_map_) { } | 62 register_allocation_map_(original->register_allocation_map_), |
| 63 tos_known_smi_map_(0) { } |
61 | 64 |
62 | 65 |
63 bool VirtualFrame::Equals(const VirtualFrame* other) { | 66 bool VirtualFrame::Equals(const VirtualFrame* other) { |
64 ASSERT(element_count() == other->element_count()); | 67 ASSERT(element_count() == other->element_count()); |
65 if (top_of_stack_state_ != other->top_of_stack_state_) return false; | 68 if (top_of_stack_state_ != other->top_of_stack_state_) return false; |
66 if (register_allocation_map_ != other->register_allocation_map_) return false; | 69 if (register_allocation_map_ != other->register_allocation_map_) return false; |
| 70 if (tos_known_smi_map_ != other->tos_known_smi_map_) return false; |
67 | 71 |
68 return true; | 72 return true; |
69 } | 73 } |
70 | 74 |
71 | 75 |
72 void VirtualFrame::PrepareForReturn() { | 76 void VirtualFrame::PrepareForReturn() { |
73 SpillAll(); | 77 SpillAll(); |
74 } | 78 } |
75 | 79 |
76 | 80 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 159 |
156 MemOperand VirtualFrame::LocalAt(int index) { | 160 MemOperand VirtualFrame::LocalAt(int index) { |
157 ASSERT(0 <= index); | 161 ASSERT(0 <= index); |
158 ASSERT(index < local_count()); | 162 ASSERT(index < local_count()); |
159 return MemOperand(fp, kLocal0Offset - index * kPointerSize); | 163 return MemOperand(fp, kLocal0Offset - index * kPointerSize); |
160 } | 164 } |
161 | 165 |
162 } } // namespace v8::internal | 166 } } // namespace v8::internal |
163 | 167 |
164 #endif // V8_VIRTUAL_FRAME_LIGHT_INL_H_ | 168 #endif // V8_VIRTUAL_FRAME_LIGHT_INL_H_ |
OLD | NEW |