Chromium Code Reviews| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 uword tags = 0; | 50 uword tags = 0; |
| 51 tags = RawObject::SizeTag::update(instance_size, tags); | 51 tags = RawObject::SizeTag::update(instance_size, tags); |
| 52 ASSERT(cls.index() != kIllegalObjectKind); | 52 ASSERT(cls.index() != kIllegalObjectKind); |
| 53 tags = RawObject::ClassTag::update(cls.index(), tags); | 53 tags = RawObject::ClassTag::update(cls.index(), tags); |
| 54 __ movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags)); | 54 __ movl(FieldAddress(instance_reg, Object::tags_offset()), Immediate(tags)); |
| 55 } else { | 55 } else { |
| 56 __ jmp(failure); | 56 __ jmp(failure); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 | |
| 61 void AssemblerMacros::EnterDartFrame(Assembler* assembler, | |
| 62 intptr_t frame_size) { | |
| 63 intptr_t offset = assembler->CodeSize(); | |
|
srdjan
2012/05/14 20:00:17
const
siva
2012/05/15 23:52:39
Done.
| |
| 64 __ EnterFrame(0); | |
| 65 Label dart_entry; | |
| 66 __ call(&dart_entry); | |
| 67 __ Bind(&dart_entry); | |
| 68 // Adjust saved PC for any intrinsic code that could have been generated | |
| 69 // before a frame is created. | |
| 70 if (offset != 0) { | |
| 71 __ addl(Address(ESP, 0), Immediate(-offset)); | |
| 72 } | |
| 73 if (frame_size != 0) { | |
| 74 Immediate frame_space(frame_size); | |
| 75 __ subl(ESP, frame_space); | |
|
srdjan
2012/05/14 20:00:17
This could fit well into one line, your choice.
siva
2012/05/15 23:52:39
Made it one line.
On 2012/05/14 20:00:17, srdjan
| |
| 76 } | |
| 77 } | |
| 78 | |
| 79 | |
| 80 void AssemblerMacros::EnterStubFrame(Assembler* assembler) { | |
| 81 __ EnterFrame(0); | |
| 82 __ pushl(Immediate(0)); // Push 0 in the saved PC area for stub frames. | |
| 83 } | |
| 84 | |
| 60 #undef __ | 85 #undef __ |
| 61 | 86 |
| 62 } // namespace dart | 87 } // namespace dart |
| 63 | 88 |
| 64 #endif // defined TARGET_ARCH_IA32 | 89 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |