| OLD | NEW | 
|---|
| 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 18 matching lines...) Expand all  Loading... | 
| 29     // instance_reg: potential next object start. | 29     // instance_reg: potential next object start. | 
| 30     __ cmpl(instance_reg, Address::Absolute(heap->EndAddress())); | 30     __ cmpl(instance_reg, Address::Absolute(heap->EndAddress())); | 
| 31     __ j(ABOVE_EQUAL, failure, Assembler::kNearJump); | 31     __ j(ABOVE_EQUAL, failure, Assembler::kNearJump); | 
| 32     // Successfully allocated the object, now update top to point to | 32     // Successfully allocated the object, now update top to point to | 
| 33     // next object start and store the class in the class field of object. | 33     // next object start and store the class in the class field of object. | 
| 34     __ movl(Address::Absolute(heap->TopAddress()), instance_reg); | 34     __ movl(Address::Absolute(heap->TopAddress()), instance_reg); | 
| 35     ASSERT(instance_size >= kHeapObjectTag); | 35     ASSERT(instance_size >= kHeapObjectTag); | 
| 36     __ subl(instance_reg, Immediate(instance_size - kHeapObjectTag)); | 36     __ subl(instance_reg, Immediate(instance_size - kHeapObjectTag)); | 
| 37     uword tags = 0; | 37     uword tags = 0; | 
| 38     tags = RawObject::SizeTag::update(instance_size, tags); | 38     tags = RawObject::SizeTag::update(instance_size, tags); | 
| 39     ASSERT(cls.id() != kIllegalObjectKind); | 39     ASSERT(cls.id() != kIllegalCid); | 
| 40     tags = RawObject::ClassIdTag::update(cls.id(), tags); | 40     tags = RawObject::ClassIdTag::update(cls.id(), tags); | 
| 41     __ movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags)); | 41     __ movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags)); | 
| 42   } else { | 42   } else { | 
| 43     __ jmp(failure); | 43     __ jmp(failure); | 
| 44   } | 44   } | 
| 45 } | 45 } | 
| 46 | 46 | 
| 47 | 47 | 
| 48 void AssemblerMacros::EnterDartFrame(Assembler* assembler, | 48 void AssemblerMacros::EnterDartFrame(Assembler* assembler, | 
| 49                                      intptr_t frame_size) { | 49                                      intptr_t frame_size) { | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
| 80 void AssemblerMacros::EnterStubFrame(Assembler* assembler) { | 80 void AssemblerMacros::EnterStubFrame(Assembler* assembler) { | 
| 81   __ EnterFrame(0); | 81   __ EnterFrame(0); | 
| 82   __ pushl(Immediate(0));  // Push 0 in the saved PC area for stub frames. | 82   __ pushl(Immediate(0));  // Push 0 in the saved PC area for stub frames. | 
| 83 } | 83 } | 
| 84 | 84 | 
| 85 #undef __ | 85 #undef __ | 
| 86 | 86 | 
| 87 }  // namespace dart | 87 }  // namespace dart | 
| 88 | 88 | 
| 89 #endif  // defined TARGET_ARCH_IA32 | 89 #endif  // defined TARGET_ARCH_IA32 | 
| OLD | NEW | 
|---|