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

Side by Side Diff: runtime/vm/intermediate_language_ia32.cc

Issue 783103003: Clobber non-live temporaries on some paths involving a possible slow-path allocation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: unnedded temp saves Created 6 years 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 | « runtime/vm/intermediate_language_arm.cc ('k') | 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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 3791 matching lines...) Expand 10 before | Expand all | Expand 10 after
3802 break; 3802 break;
3803 default: 3803 default:
3804 UNREACHABLE(); 3804 UNREACHABLE();
3805 break; 3805 break;
3806 } 3806 }
3807 if (can_pack_into_smi()) { 3807 if (can_pack_into_smi()) {
3808 __ SmiTag(result); 3808 __ SmiTag(result);
3809 } else { 3809 } else {
3810 // If the value cannot fit in a smi then allocate a mint box for it. 3810 // If the value cannot fit in a smi then allocate a mint box for it.
3811 Register temp = locs()->temp(0).reg(); 3811 Register temp = locs()->temp(0).reg();
3812 // Temp register needs to be manually preserved on allocation slow-path.
3813 locs()->live_registers()->Add(locs()->temp(0), kUnboxedInt32);
3814
3812 ASSERT(temp != result); 3815 ASSERT(temp != result);
3813 __ MoveRegister(temp, result); 3816 __ MoveRegister(temp, result);
3814 __ SmiTag(result); 3817 __ SmiTag(result);
3815 3818
3816 Label done; 3819 Label done;
3817 __ testl(temp, Immediate(0xC0000000)); 3820 __ testl(temp, Immediate(0xC0000000));
3818 __ j(ZERO, &done); 3821 __ j(ZERO, &done);
3819 BoxAllocationSlowPath::Allocate( 3822 BoxAllocationSlowPath::Allocate(
3820 compiler, this, compiler->mint_class(), result, kNoRegister); 3823 compiler, this, compiler->mint_class(), result, kNoRegister);
3821 __ movl(FieldAddress(result, Mint::value_offset()), temp); 3824 __ movl(FieldAddress(result, Mint::value_offset()), temp);
(...skipping 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after
6821 #if defined(DEBUG) 6824 #if defined(DEBUG)
6822 __ movl(EDX, Immediate(kInvalidObjectPointer)); 6825 __ movl(EDX, Immediate(kInvalidObjectPointer));
6823 #endif 6826 #endif
6824 } 6827 }
6825 6828
6826 } // namespace dart 6829 } // namespace dart
6827 6830
6828 #undef __ 6831 #undef __
6829 6832
6830 #endif // defined TARGET_ARCH_IA32 6833 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698