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

Side by Side Diff: src/arm/fast-codegen-arm.cc

Issue 384085: Fix bug in the top-level compiler: write barrier for assignments to context slots:... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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 | no next file » | 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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 855
856 // RecordWrite may destroy all its register arguments. 856 // RecordWrite may destroy all its register arguments.
857 if (expr->context() == Expression::kValue) { 857 if (expr->context() == Expression::kValue) {
858 __ push(r1); 858 __ push(r1);
859 } else if (expr->context() != Expression::kEffect) { 859 } else if (expr->context() != Expression::kEffect) {
860 __ mov(r3, r1); 860 __ mov(r3, r1);
861 } 861 }
862 int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize; 862 int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize;
863 863
864 // Update the write barrier for the array store with r0 as the scratch 864 // Update the write barrier for the array store with r0 as the scratch
865 // register. Skip the write barrier if r0 is a smi. 865 // register. Skip the write barrier if the value written (r1) is a smi.
866 // The smi test is part of RecordWrite on other platforms, not on arm. 866 // The smi test is part of RecordWrite on other platforms, not on arm.
867 Label exit; 867 Label exit;
868 __ tst(r0, Operand(kSmiTagMask)); 868 __ tst(r1, Operand(kSmiTagMask));
869 __ b(eq, &exit); 869 __ b(eq, &exit);
870 870
871 __ mov(r2, Operand(offset)); 871 __ mov(r2, Operand(offset));
872 __ RecordWrite(r0, r2, r1); 872 __ RecordWrite(r0, r2, r1);
873 __ bind(&exit); 873 __ bind(&exit);
874 if (expr->context() != Expression::kEffect && 874 if (expr->context() != Expression::kEffect &&
875 expr->context() != Expression::kValue) { 875 expr->context() != Expression::kValue) {
876 Move(expr->context(), r3); 876 Move(expr->context(), r3);
877 } 877 }
878 break; 878 break;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 true_label_ = saved_true; 1563 true_label_ = saved_true;
1564 false_label_ = saved_false; 1564 false_label_ = saved_false;
1565 // Convert current context to test context: End post-test code. 1565 // Convert current context to test context: End post-test code.
1566 } 1566 }
1567 1567
1568 1568
1569 #undef __ 1569 #undef __
1570 1570
1571 1571
1572 } } // namespace v8::internal 1572 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698