Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: src/virtual-frame-ia32.cc

Issue 57053: Fix issue 294 by ensuring that we don't lose the copy flag on memory... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-294.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 // The element is memory, a register, or a constant. 972 // The element is memory, a register, or a constant.
973 if (element.is_memory()) { 973 if (element.is_memory()) {
974 // Memory elements could only be the backing store of a copy. 974 // Memory elements could only be the backing store of a copy.
975 // Allocate the original to a register. 975 // Allocate the original to a register.
976 ASSERT(index <= stack_pointer_); 976 ASSERT(index <= stack_pointer_);
977 Result temp = cgen_->allocator()->Allocate(); 977 Result temp = cgen_->allocator()->Allocate();
978 ASSERT(temp.is_valid()); 978 ASSERT(temp.is_valid());
979 Use(temp.reg(), index); 979 Use(temp.reg(), index);
980 FrameElement new_element = 980 FrameElement new_element =
981 FrameElement::RegisterElement(temp.reg(), FrameElement::SYNCED); 981 FrameElement::RegisterElement(temp.reg(), FrameElement::SYNCED);
982 // Preserve the copy flag on the element.
983 if (element.is_copied()) new_element.set_copied();
982 elements_[index] = new_element; 984 elements_[index] = new_element;
983 __ mov(temp.reg(), Operand(ebp, fp_relative(index))); 985 __ mov(temp.reg(), Operand(ebp, fp_relative(index)));
984 return Result(temp.reg(), cgen_); 986 return Result(temp.reg(), cgen_);
985 } else if (element.is_register()) { 987 } else if (element.is_register()) {
986 return Result(element.reg(), cgen_); 988 return Result(element.reg(), cgen_);
987 } else { 989 } else {
988 ASSERT(element.is_constant()); 990 ASSERT(element.is_constant());
989 return Result(element.handle(), cgen_); 991 return Result(element.handle(), cgen_);
990 } 992 }
991 } 993 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 ASSERT(stack_pointer_ == elements_.length() - 1); 1029 ASSERT(stack_pointer_ == elements_.length() - 1);
1028 elements_.Add(FrameElement::MemoryElement()); 1030 elements_.Add(FrameElement::MemoryElement());
1029 stack_pointer_++; 1031 stack_pointer_++;
1030 __ push(immediate); 1032 __ push(immediate);
1031 } 1033 }
1032 1034
1033 1035
1034 #undef __ 1036 #undef __
1035 1037
1036 } } // namespace v8::internal 1038 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-294.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698