| 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" // 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 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2478 // next object start and initialize the object. | 2478 // next object start and initialize the object. |
| 2479 // EAX: new object. | 2479 // EAX: new object. |
| 2480 // EBX: next object start. | 2480 // EBX: next object start. |
| 2481 // EDX: number of context variables. | 2481 // EDX: number of context variables. |
| 2482 __ movl(Address::Absolute(heap->TopAddress()), temp1); | 2482 __ movl(Address::Absolute(heap->TopAddress()), temp1); |
| 2483 __ addl(result, Immediate(kHeapObjectTag)); | 2483 __ addl(result, Immediate(kHeapObjectTag)); |
| 2484 __ UpdateAllocationStatsWithSize(kContextCid, instance_size, kNoRegister); | 2484 __ UpdateAllocationStatsWithSize(kContextCid, instance_size, kNoRegister); |
| 2485 | 2485 |
| 2486 // Calculate the size tag and write tags. | 2486 // Calculate the size tag and write tags. |
| 2487 intptr_t size_tag = (instance_size > RawObject::SizeTag::kMaxSizeTag) | 2487 intptr_t size_tag = (instance_size > RawObject::SizeTag::kMaxSizeTag) |
| 2488 ? 0 : instance_size << (RawObject::kSizeTagBit - kObjectAlignmentLog2); | 2488 ? 0 : instance_size << (RawObject::kSizeTagPos - kObjectAlignmentLog2); |
| 2489 | 2489 |
| 2490 intptr_t tags = size_tag | RawObject::ClassIdTag::encode(kContextCid); | 2490 intptr_t tags = size_tag | RawObject::ClassIdTag::encode(kContextCid); |
| 2491 __ movl(FieldAddress(result, Context::tags_offset()), Immediate(tags)); | 2491 __ movl(FieldAddress(result, Context::tags_offset()), Immediate(tags)); |
| 2492 | 2492 |
| 2493 // Setup up number of context variables field. | 2493 // Setup up number of context variables field. |
| 2494 // EAX: new object. | 2494 // EAX: new object. |
| 2495 __ movl(FieldAddress(result, Context::num_variables_offset()), | 2495 __ movl(FieldAddress(result, Context::num_variables_offset()), |
| 2496 Immediate(num_context_variables())); | 2496 Immediate(num_context_variables())); |
| 2497 | 2497 |
| 2498 // Setup isolate field. | 2498 // Setup isolate field. |
| (...skipping 3485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5984 PcDescriptors::kOther, | 5984 PcDescriptors::kOther, |
| 5985 locs()); | 5985 locs()); |
| 5986 __ Drop(ArgumentCount()); // Discard arguments. | 5986 __ Drop(ArgumentCount()); // Discard arguments. |
| 5987 } | 5987 } |
| 5988 | 5988 |
| 5989 } // namespace dart | 5989 } // namespace dart |
| 5990 | 5990 |
| 5991 #undef __ | 5991 #undef __ |
| 5992 | 5992 |
| 5993 #endif // defined TARGET_ARCH_IA32 | 5993 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |