| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 5870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5881 // Function in RAX. | 5881 // Function in RAX. |
| 5882 ASSERT(locs()->in(0).reg() == RAX); | 5882 ASSERT(locs()->in(0).reg() == RAX); |
| 5883 __ movq(RCX, FieldAddress(RAX, Function::instructions_offset())); | 5883 __ movq(RCX, FieldAddress(RAX, Function::instructions_offset())); |
| 5884 | 5884 |
| 5885 // RAX: Function. | 5885 // RAX: Function. |
| 5886 // R10: Arguments descriptor array. | 5886 // R10: Arguments descriptor array. |
| 5887 // RBX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 5887 // RBX: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 5888 __ xorq(RBX, RBX); | 5888 __ xorq(RBX, RBX); |
| 5889 __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); | 5889 __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); |
| 5890 __ call(RCX); | 5890 __ call(RCX); |
| 5891 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall, | 5891 compiler->RecordCallInfo(token_pos(), |
| 5892 deopt_id(), | 5892 RawPcDescriptors::kClosureCall, |
| 5893 token_pos()); | 5893 deopt_id(), |
| 5894 compiler->RecordSafepoint(locs()); | 5894 locs(), |
| 5895 // Marks either the continuation point in unoptimized code or the | 5895 locs()->input_count()); |
| 5896 // deoptimization point in optimized code, after call. | |
| 5897 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | |
| 5898 if (compiler->is_optimizing()) { | |
| 5899 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | |
| 5900 } else { | |
| 5901 // Add deoptimization continuation point after the call and before the | |
| 5902 // arguments are removed. | |
| 5903 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | |
| 5904 deopt_id_after, | |
| 5905 token_pos()); | |
| 5906 } | |
| 5907 __ Drop(argument_count); | 5896 __ Drop(argument_count); |
| 5908 } | 5897 } |
| 5909 | 5898 |
| 5910 | 5899 |
| 5911 LocationSummary* BooleanNegateInstr::MakeLocationSummary(Isolate* isolate, | 5900 LocationSummary* BooleanNegateInstr::MakeLocationSummary(Isolate* isolate, |
| 5912 bool opt) const { | 5901 bool opt) const { |
| 5913 return LocationSummary::Make(isolate, | 5902 return LocationSummary::Make(isolate, |
| 5914 1, | 5903 1, |
| 5915 Location::RequiresRegister(), | 5904 Location::RequiresRegister(), |
| 5916 LocationSummary::kNoCall); | 5905 LocationSummary::kNoCall); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5959 __ movq(R10, Immediate(kInvalidObjectPointer)); | 5948 __ movq(R10, Immediate(kInvalidObjectPointer)); |
| 5960 __ movq(RBX, Immediate(kInvalidObjectPointer)); | 5949 __ movq(RBX, Immediate(kInvalidObjectPointer)); |
| 5961 #endif | 5950 #endif |
| 5962 } | 5951 } |
| 5963 | 5952 |
| 5964 } // namespace dart | 5953 } // namespace dart |
| 5965 | 5954 |
| 5966 #undef __ | 5955 #undef __ |
| 5967 | 5956 |
| 5968 #endif // defined TARGET_ARCH_X64 | 5957 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |