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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 elements_[index].set_reg(target); | 333 elements_[index].set_reg(target); |
334 register_locations_[target.code()] = index; | 334 register_locations_[target.code()] = index; |
335 register_locations_[source.code()] = use_index; | 335 register_locations_[source.code()] = use_index; |
336 __ xchg(source, target); | 336 __ xchg(source, target); |
337 } | 337 } |
338 } | 338 } |
339 } | 339 } |
340 } | 340 } |
341 | 341 |
342 | 342 |
343 void VirtualFrame::MergeMoveMemoryToRegisters(VirtualFrame *expected) { | 343 void VirtualFrame::MergeMoveMemoryToRegisters(VirtualFrame* expected) { |
344 // Move memory, constants, and copies to registers. This is the | 344 // Move memory, constants, and copies to registers. This is the |
345 // final step and is done from the bottom up so that the backing | 345 // final step and is done from the bottom up so that the backing |
346 // elements of copies are in their correct locations when we | 346 // elements of copies are in their correct locations when we |
347 // encounter the copies. | 347 // encounter the copies. |
348 for (int i = 0; i < kNumRegisters; i++) { | 348 for (int i = 0; i < kNumRegisters; i++) { |
349 int index = expected->register_locations_[i]; | 349 int index = expected->register_locations_[i]; |
350 if (index != kIllegalIndex) { | 350 if (index != kIllegalIndex) { |
351 FrameElement source = elements_[index]; | 351 FrameElement source = elements_[index]; |
352 FrameElement target = expected->elements_[index]; | 352 FrameElement target = expected->elements_[index]; |
353 switch (source.type()) { | 353 switch (source.type()) { |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 ASSERT(stack_pointer_ == elements_.length() - 1); | 1045 ASSERT(stack_pointer_ == elements_.length() - 1); |
1046 elements_.Add(FrameElement::MemoryElement()); | 1046 elements_.Add(FrameElement::MemoryElement()); |
1047 stack_pointer_++; | 1047 stack_pointer_++; |
1048 __ push(immediate); | 1048 __ push(immediate); |
1049 } | 1049 } |
1050 | 1050 |
1051 | 1051 |
1052 #undef __ | 1052 #undef __ |
1053 | 1053 |
1054 } } // namespace v8::internal | 1054 } } // namespace v8::internal |
OLD | NEW |