| OLD | NEW |
| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 #endif // DEBUG | 870 #endif // DEBUG |
| 871 __ j(ABOVE_EQUAL, &slow_case, kJumpLength); | 871 __ j(ABOVE_EQUAL, &slow_case, kJumpLength); |
| 872 } | 872 } |
| 873 | 873 |
| 874 // Successfully allocated the object, now update top to point to | 874 // Successfully allocated the object, now update top to point to |
| 875 // next object start and initialize the object. | 875 // next object start and initialize the object. |
| 876 // EAX: new object. | 876 // EAX: new object. |
| 877 // EBX: next object start. | 877 // EBX: next object start. |
| 878 // EDX: number of context variables. | 878 // EDX: number of context variables. |
| 879 __ movl(Address(ECX, Heap::TopOffset(space)), EBX); | 879 __ movl(Address(ECX, Heap::TopOffset(space)), EBX); |
| 880 __ addl(EAX, Immediate(kHeapObjectTag)); | |
| 881 // EBX: Size of allocation in bytes. | 880 // EBX: Size of allocation in bytes. |
| 882 __ subl(EBX, EAX); | 881 __ subl(EBX, EAX); |
| 882 __ addl(EAX, Immediate(kHeapObjectTag)); |
| 883 // Generate isolate-independent code to allow sharing between isolates. | 883 // Generate isolate-independent code to allow sharing between isolates. |
| 884 __ UpdateAllocationStatsWithSize(cid, EBX, EDI, space, | 884 __ UpdateAllocationStatsWithSize(cid, EBX, EDI, space, |
| 885 /* inline_isolate = */ false); | 885 /* inline_isolate = */ false); |
| 886 | 886 |
| 887 // Calculate the size tag. | 887 // Calculate the size tag. |
| 888 // EAX: new object. | 888 // EAX: new object. |
| 889 // EDX: number of context variables. | 889 // EDX: number of context variables. |
| 890 { | 890 { |
| 891 Label size_tag_overflow, done; | 891 Label size_tag_overflow, done; |
| 892 __ leal(EBX, Address(EDX, TIMES_4, fixed_size)); | 892 __ leal(EBX, Address(EDX, TIMES_4, fixed_size)); |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2127 // EBX: entry point. | 2127 // EBX: entry point. |
| 2128 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 2128 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { |
| 2129 EmitMegamorphicLookup(assembler, EDI, EBX, EBX); | 2129 EmitMegamorphicLookup(assembler, EDI, EBX, EBX); |
| 2130 __ ret(); | 2130 __ ret(); |
| 2131 } | 2131 } |
| 2132 | 2132 |
| 2133 | 2133 |
| 2134 } // namespace dart | 2134 } // namespace dart |
| 2135 | 2135 |
| 2136 #endif // defined TARGET_ARCH_IA32 | 2136 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |