Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 1316673005: Track which entries in the ObjectPool are native entries, and reset them when loading a precompiled… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 uword entry; 940 uword entry;
941 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); 941 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
942 const bool is_leaf_call = 942 const bool is_leaf_call =
943 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; 943 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
944 const StubEntry* stub_entry; 944 const StubEntry* stub_entry;
945 if (link_lazily()) { 945 if (link_lazily()) {
946 stub_entry = StubCode::CallBootstrapCFunction_entry(); 946 stub_entry = StubCode::CallBootstrapCFunction_entry();
947 entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall); 947 entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall);
948 #if defined(USING_SIMULATOR) 948 #if defined(USING_SIMULATOR)
949 entry = Simulator::RedirectExternalReference( 949 entry = Simulator::RedirectExternalReference(
950 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); 950 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
951 #endif 951 #endif
952 } else { 952 } else {
953 entry = reinterpret_cast<uword>(native_c_function()); 953 entry = reinterpret_cast<uword>(native_c_function());
954 if (is_bootstrap_native() || is_leaf_call) { 954 if (is_bootstrap_native() || is_leaf_call) {
955 stub_entry = StubCode::CallBootstrapCFunction_entry(); 955 stub_entry = StubCode::CallBootstrapCFunction_entry();
956 #if defined(USING_SIMULATOR) 956 #if defined(USING_SIMULATOR)
957 entry = Simulator::RedirectExternalReference( 957 entry = Simulator::RedirectExternalReference(
958 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); 958 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
959 #endif 959 #endif
960 } else { 960 } else {
961 // In the case of non bootstrap native methods the CallNativeCFunction 961 // In the case of non bootstrap native methods the CallNativeCFunction
962 // stub generates the redirection address when running under the simulator 962 // stub generates the redirection address when running under the simulator
963 // and hence we do not change 'entry' here. 963 // and hence we do not change 'entry' here.
964 stub_entry = StubCode::CallNativeCFunction_entry(); 964 stub_entry = StubCode::CallNativeCFunction_entry();
965 #if defined(USING_SIMULATOR) 965 #if defined(USING_SIMULATOR)
966 if (!function().IsNativeAutoSetupScope()) { 966 if (!function().IsNativeAutoSetupScope()) {
967 entry = Simulator::RedirectExternalReference( 967 entry = Simulator::RedirectExternalReference(
968 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); 968 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
969 } 969 }
970 #endif 970 #endif
971 } 971 }
972 } 972 }
973 __ LoadImmediate(R1, argc_tag); 973 __ LoadImmediate(R1, argc_tag);
974 ExternalLabel label(entry); 974 ExternalLabel label(entry);
975 __ LoadExternalLabel(R5, &label, link_lazily() ? kPatchable : kNotPatchable); 975 __ LoadNativeEntry(R5, &label, link_lazily() ? kPatchable : kNotPatchable);
976 compiler->GenerateCall(token_pos(), 976 compiler->GenerateCall(token_pos(),
977 *stub_entry, 977 *stub_entry,
978 RawPcDescriptors::kOther, 978 RawPcDescriptors::kOther,
979 locs()); 979 locs());
980 __ Pop(result); 980 __ Pop(result);
981 } 981 }
982 982
983 983
984 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Zone* zone, 984 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Zone* zone,
985 bool opt) const { 985 bool opt) const {
(...skipping 5877 matching lines...) Expand 10 before | Expand all | Expand 10 after
6863 1, 6863 1,
6864 locs()); 6864 locs());
6865 __ Drop(1); 6865 __ Drop(1);
6866 __ Pop(result); 6866 __ Pop(result);
6867 } 6867 }
6868 6868
6869 6869
6870 } // namespace dart 6870 } // namespace dart
6871 6871
6872 #endif // defined TARGET_ARCH_ARM 6872 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698