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

Side by Side Diff: vm/assembler_macros_ia32.cc

Issue 9021025: Check all cases with "__ movl(FieldAddress" and converted them to StoreIntoObject where appropriate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 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 | « no previous file | vm/code_generator_ia32.cc » ('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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler_macros.h" 8 #include "vm/assembler_macros.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 26 matching lines...) Expand all
37 __ movl(instance_reg, Address::Absolute(heap->TopAddress())); 37 __ movl(instance_reg, Address::Absolute(heap->TopAddress()));
38 __ addl(instance_reg, Immediate(instance_size)); 38 __ addl(instance_reg, Immediate(instance_size));
39 // instance_reg: potential next object start. 39 // instance_reg: potential next object start.
40 __ cmpl(instance_reg, Address::Absolute(heap->EndAddress())); 40 __ cmpl(instance_reg, Address::Absolute(heap->EndAddress()));
41 __ j(ABOVE_EQUAL, failure, Assembler::kNearJump); 41 __ j(ABOVE_EQUAL, failure, Assembler::kNearJump);
42 // Successfully allocated the object, now update top to point to 42 // Successfully allocated the object, now update top to point to
43 // next object start and store the class in the class field of object. 43 // next object start and store the class in the class field of object.
44 __ movl(Address::Absolute(heap->TopAddress()), instance_reg); 44 __ movl(Address::Absolute(heap->TopAddress()), instance_reg);
45 ASSERT(instance_size >= kHeapObjectTag); 45 ASSERT(instance_size >= kHeapObjectTag);
46 __ subl(instance_reg, Immediate(instance_size - kHeapObjectTag)); 46 __ subl(instance_reg, Immediate(instance_size - kHeapObjectTag));
47 __ movl(FieldAddress(instance_reg, Instance::class_offset()), class_reg); 47 __ StoreIntoObject(instance_reg,
48 FieldAddress(instance_reg, Instance::class_offset()),
49 class_reg);
48 } else { 50 } else {
49 __ jmp(failure); 51 __ jmp(failure);
50 } 52 }
51 } 53 }
52 54
53 #undef __ 55 #undef __
54 56
55 } // namespace dart 57 } // namespace dart
56 58
57 #endif // defined TARGET_ARCH_IA32 59 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | vm/code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698