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

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

Issue 53008: Fix issue 286. Ensure frame elements are invalidated by... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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-286.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 Result fresh = cgen_->allocator()->Allocate(); 531 Result fresh = cgen_->allocator()->Allocate();
532 ASSERT(fresh.is_valid()); 532 ASSERT(fresh.is_valid());
533 Use(fresh.reg(), new_backing_index); 533 Use(fresh.reg(), new_backing_index);
534 backing_reg = fresh.reg(); 534 backing_reg = fresh.reg();
535 __ mov(backing_reg, Operand(ebp, fp_relative(index))); 535 __ mov(backing_reg, Operand(ebp, fp_relative(index)));
536 } else { 536 } else {
537 // The original was in a register. 537 // The original was in a register.
538 backing_reg = original.reg(); 538 backing_reg = original.reg();
539 register_locations_[backing_reg.code()] = new_backing_index; 539 register_locations_[backing_reg.code()] = new_backing_index;
540 } 540 }
541 // Invalidate the element at index.
542 elements_[index] = FrameElement::InvalidElement();
543 // Set the new backing element.
541 if (elements_[new_backing_index].is_synced()) { 544 if (elements_[new_backing_index].is_synced()) {
542 elements_[new_backing_index] = 545 elements_[new_backing_index] =
543 FrameElement::RegisterElement(backing_reg, FrameElement::SYNCED); 546 FrameElement::RegisterElement(backing_reg, FrameElement::SYNCED);
544 } else { 547 } else {
545 elements_[new_backing_index] = 548 elements_[new_backing_index] =
546 FrameElement::RegisterElement(backing_reg, FrameElement::NOT_SYNCED); 549 FrameElement::RegisterElement(backing_reg, FrameElement::NOT_SYNCED);
547 } 550 }
548 // Update the other copies. 551 // Update the other copies.
549 for (int i = new_backing_index + 1; i < elements_.length(); i++) { 552 for (int i = new_backing_index + 1; i < elements_.length(); i++) {
550 if (elements_[i].is_copy() && elements_[i].index() == index) { 553 if (elements_[i].is_copy() && elements_[i].index() == index) {
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 ASSERT(stack_pointer_ == elements_.length() - 1); 951 ASSERT(stack_pointer_ == elements_.length() - 1);
949 elements_.Add(FrameElement::MemoryElement()); 952 elements_.Add(FrameElement::MemoryElement());
950 stack_pointer_++; 953 stack_pointer_++;
951 __ push(immediate); 954 __ push(immediate);
952 } 955 }
953 956
954 957
955 #undef __ 958 #undef __
956 959
957 } } // namespace v8::internal 960 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-286.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698