| 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 6769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6780 // EBX: Code (compiled code or lazy compile stub). | 6780 // EBX: Code (compiled code or lazy compile stub). |
| 6781 ASSERT(locs()->in(0).reg() == EAX); | 6781 ASSERT(locs()->in(0).reg() == EAX); |
| 6782 __ movl(EBX, FieldAddress(EAX, Function::instructions_offset())); | 6782 __ movl(EBX, FieldAddress(EAX, Function::instructions_offset())); |
| 6783 | 6783 |
| 6784 // EAX: Function. | 6784 // EAX: Function. |
| 6785 // EDX: Arguments descriptor array. | 6785 // EDX: Arguments descriptor array. |
| 6786 // ECX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 6786 // ECX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 6787 __ xorl(ECX, ECX); | 6787 __ xorl(ECX, ECX); |
| 6788 __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); | 6788 __ addl(EBX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); |
| 6789 __ call(EBX); | 6789 __ call(EBX); |
| 6790 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall, | |
| 6791 deopt_id(), | |
| 6792 token_pos()); | |
| 6793 compiler->RecordSafepoint(locs()); | 6790 compiler->RecordSafepoint(locs()); |
| 6794 // Marks either the continuation point in unoptimized code or the | 6791 // Marks either the continuation point in unoptimized code or the |
| 6795 // deoptimization point in optimized code, after call. | 6792 // deoptimization point in optimized code, after call. |
| 6796 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 6793 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
| 6797 if (compiler->is_optimizing()) { | 6794 if (compiler->is_optimizing()) { |
| 6798 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | 6795 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); |
| 6799 } else { | |
| 6800 // Add deoptimization continuation point after the call and before the | |
| 6801 // arguments are removed. | |
| 6802 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | |
| 6803 deopt_id_after, | |
| 6804 token_pos()); | |
| 6805 } | 6796 } |
| 6797 // Add deoptimization continuation point after the call and before the |
| 6798 // arguments are removed. |
| 6799 // In optimized code this descriptor is needed for exception handling. |
| 6800 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
| 6801 deopt_id_after, |
| 6802 token_pos()); |
| 6806 __ Drop(argument_count); | 6803 __ Drop(argument_count); |
| 6807 } | 6804 } |
| 6808 | 6805 |
| 6809 | 6806 |
| 6810 LocationSummary* BooleanNegateInstr::MakeLocationSummary(Zone* zone, | 6807 LocationSummary* BooleanNegateInstr::MakeLocationSummary(Zone* zone, |
| 6811 bool opt) const { | 6808 bool opt) const { |
| 6812 return LocationSummary::Make(zone, | 6809 return LocationSummary::Make(zone, |
| 6813 1, | 6810 1, |
| 6814 Location::RequiresRegister(), | 6811 Location::RequiresRegister(), |
| 6815 LocationSummary::kNoCall); | 6812 LocationSummary::kNoCall); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6883 __ Drop(1); | 6880 __ Drop(1); |
| 6884 __ popl(result); | 6881 __ popl(result); |
| 6885 } | 6882 } |
| 6886 | 6883 |
| 6887 | 6884 |
| 6888 } // namespace dart | 6885 } // namespace dart |
| 6889 | 6886 |
| 6890 #undef __ | 6887 #undef __ |
| 6891 | 6888 |
| 6892 #endif // defined TARGET_ARCH_IA32 | 6889 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |