OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 ASSERT(!link_lazily()); | 962 ASSERT(!link_lazily()); |
963 const ExternalLabel label(reinterpret_cast<uword>(native_c_function())); | 963 const ExternalLabel label(reinterpret_cast<uword>(native_c_function())); |
964 const intptr_t target_kidx = | 964 const intptr_t target_kidx = |
965 __ object_pool_wrapper().FindNativeEntry(&label, kNotPatchable); | 965 __ object_pool_wrapper().FindNativeEntry(&label, kNotPatchable); |
966 const intptr_t argc_tag_kidx = | 966 const intptr_t argc_tag_kidx = |
967 __ object_pool_wrapper().FindImmediate(static_cast<uword>(argc_tag)); | 967 __ object_pool_wrapper().FindImmediate(static_cast<uword>(argc_tag)); |
968 __ PushConstant(target_kidx); | 968 __ PushConstant(target_kidx); |
969 __ PushConstant(argc_tag_kidx); | 969 __ PushConstant(argc_tag_kidx); |
970 if (is_bootstrap_native()) { | 970 if (is_bootstrap_native()) { |
971 __ NativeBootstrapCall(); | 971 __ NativeBootstrapCall(); |
| 972 } else if (is_auto_scope()) { |
| 973 __ NativeAutoScopeCall(); |
972 } else { | 974 } else { |
973 __ NativeCall(); | 975 __ NativeNoScopeCall(); |
974 } | 976 } |
975 compiler->RecordSafepoint(locs()); | 977 compiler->RecordSafepoint(locs()); |
976 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId, | 978 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, Thread::kNoDeoptId, |
977 token_pos()); | 979 token_pos()); |
978 } | 980 } |
979 | 981 |
980 | 982 |
981 EMIT_NATIVE_CODE(OneByteStringFromCharCode, | 983 EMIT_NATIVE_CODE(OneByteStringFromCharCode, |
982 1, | 984 1, |
983 Location::RequiresRegister(), | 985 Location::RequiresRegister(), |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2050 } | 2052 } |
2051 __ IfULe(length, index); | 2053 __ IfULe(length, index); |
2052 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound, | 2054 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound, |
2053 (generalized_ ? ICData::kGeneralized : 0) | | 2055 (generalized_ ? ICData::kGeneralized : 0) | |
2054 (licm_hoisted_ ? ICData::kHoisted : 0)); | 2056 (licm_hoisted_ ? ICData::kHoisted : 0)); |
2055 } | 2057 } |
2056 | 2058 |
2057 } // namespace dart | 2059 } // namespace dart |
2058 | 2060 |
2059 #endif // defined TARGET_ARCH_DBC | 2061 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |