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 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 Result temp = cgen_->allocator()->Allocate(); | 1066 Result temp = cgen_->allocator()->Allocate(); |
1067 ASSERT(temp.is_valid()); | 1067 ASSERT(temp.is_valid()); |
1068 Use(temp.reg(), index); | 1068 Use(temp.reg(), index); |
1069 FrameElement new_element = | 1069 FrameElement new_element = |
1070 FrameElement::RegisterElement(temp.reg(), FrameElement::SYNCED); | 1070 FrameElement::RegisterElement(temp.reg(), FrameElement::SYNCED); |
1071 // Preserve the copy flag on the element. | 1071 // Preserve the copy flag on the element. |
1072 if (element.is_copied()) new_element.set_copied(); | 1072 if (element.is_copied()) new_element.set_copied(); |
1073 new_element.set_static_type(element.static_type()); | 1073 new_element.set_static_type(element.static_type()); |
1074 elements_[index] = new_element; | 1074 elements_[index] = new_element; |
1075 __ mov(temp.reg(), Operand(ebp, fp_relative(index))); | 1075 __ mov(temp.reg(), Operand(ebp, fp_relative(index))); |
1076 return Result(temp.reg(), cgen_, element.static_type()); | 1076 return Result(temp.reg(), element.static_type()); |
1077 } else if (element.is_register()) { | 1077 } else if (element.is_register()) { |
1078 return Result(element.reg(), cgen_, element.static_type()); | 1078 return Result(element.reg(), element.static_type()); |
1079 } else { | 1079 } else { |
1080 ASSERT(element.is_constant()); | 1080 ASSERT(element.is_constant()); |
1081 return Result(element.handle(), cgen_); | 1081 return Result(element.handle()); |
1082 } | 1082 } |
1083 } | 1083 } |
1084 | 1084 |
1085 | 1085 |
1086 void VirtualFrame::EmitPop(Register reg) { | 1086 void VirtualFrame::EmitPop(Register reg) { |
1087 ASSERT(stack_pointer_ == elements_.length() - 1); | 1087 ASSERT(stack_pointer_ == elements_.length() - 1); |
1088 stack_pointer_--; | 1088 stack_pointer_--; |
1089 elements_.RemoveLast(); | 1089 elements_.RemoveLast(); |
1090 __ pop(reg); | 1090 __ pop(reg); |
1091 } | 1091 } |
(...skipping 27 matching lines...) Expand all Loading... |
1119 ASSERT(stack_pointer_ == elements_.length() - 1); | 1119 ASSERT(stack_pointer_ == elements_.length() - 1); |
1120 elements_.Add(FrameElement::MemoryElement()); | 1120 elements_.Add(FrameElement::MemoryElement()); |
1121 stack_pointer_++; | 1121 stack_pointer_++; |
1122 __ push(immediate); | 1122 __ push(immediate); |
1123 } | 1123 } |
1124 | 1124 |
1125 | 1125 |
1126 #undef __ | 1126 #undef __ |
1127 | 1127 |
1128 } } // namespace v8::internal | 1128 } } // namespace v8::internal |
OLD | NEW |