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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 uword entry; 991 uword entry;
992 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); 992 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
993 const bool is_leaf_call = 993 const bool is_leaf_call =
994 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; 994 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
995 const StubEntry* stub_entry; 995 const StubEntry* stub_entry;
996 if (link_lazily()) { 996 if (link_lazily()) {
997 stub_entry = StubCode::CallBootstrapCFunction_entry(); 997 stub_entry = StubCode::CallBootstrapCFunction_entry();
998 entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall); 998 entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall);
999 #if defined(USING_SIMULATOR) 999 #if defined(USING_SIMULATOR)
1000 entry = Simulator::RedirectExternalReference( 1000 entry = Simulator::RedirectExternalReference(
1001 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); 1001 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
1002 #endif 1002 #endif
1003 } else { 1003 } else {
1004 entry = reinterpret_cast<uword>(native_c_function()); 1004 entry = reinterpret_cast<uword>(native_c_function());
1005 if (is_bootstrap_native() || is_leaf_call) { 1005 if (is_bootstrap_native() || is_leaf_call) {
1006 stub_entry = StubCode::CallBootstrapCFunction_entry(); 1006 stub_entry = StubCode::CallBootstrapCFunction_entry();
1007 #if defined(USING_SIMULATOR) 1007 #if defined(USING_SIMULATOR)
1008 entry = Simulator::RedirectExternalReference( 1008 entry = Simulator::RedirectExternalReference(
1009 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); 1009 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
1010 #endif 1010 #endif
1011 } else { 1011 } else {
1012 // In the case of non bootstrap native methods the CallNativeCFunction 1012 // In the case of non bootstrap native methods the CallNativeCFunction
1013 // stub generates the redirection address when running under the simulator 1013 // stub generates the redirection address when running under the simulator
1014 // and hence we do not change 'entry' here. 1014 // and hence we do not change 'entry' here.
1015 stub_entry = StubCode::CallNativeCFunction_entry(); 1015 stub_entry = StubCode::CallNativeCFunction_entry();
1016 #if defined(USING_SIMULATOR) 1016 #if defined(USING_SIMULATOR)
1017 if (!function().IsNativeAutoSetupScope()) { 1017 if (!function().IsNativeAutoSetupScope()) {
1018 entry = Simulator::RedirectExternalReference( 1018 entry = Simulator::RedirectExternalReference(
1019 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); 1019 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
1020 } 1020 }
1021 #endif 1021 #endif
1022 } 1022 }
1023 } 1023 }
1024 __ LoadImmediate(A1, argc_tag); 1024 __ LoadImmediate(A1, argc_tag);
1025 ExternalLabel label(entry); 1025 ExternalLabel label(entry);
1026 __ LoadExternalLabel(T5, &label, kNotPatchable); 1026 __ LoadNativeEntry(T5, &label, kNotPatchable);
1027 compiler->GenerateCall(token_pos(), 1027 compiler->GenerateCall(token_pos(),
1028 *stub_entry, 1028 *stub_entry,
1029 RawPcDescriptors::kOther, 1029 RawPcDescriptors::kOther,
1030 locs()); 1030 locs());
1031 __ Pop(result); 1031 __ Pop(result);
1032 } 1032 }
1033 1033
1034 1034
1035 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Zone* zone, 1035 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Zone* zone,
1036 bool opt) const { 1036 bool opt) const {
(...skipping 4564 matching lines...) Expand 10 before | Expand all | Expand 10 after
5601 1, 5601 1,
5602 locs()); 5602 locs());
5603 __ lw(result, Address(SP, 1 * kWordSize)); 5603 __ lw(result, Address(SP, 1 * kWordSize));
5604 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5604 __ addiu(SP, SP, Immediate(2 * kWordSize));
5605 } 5605 }
5606 5606
5607 5607
5608 } // namespace dart 5608 } // namespace dart
5609 5609
5610 #endif // defined TARGET_ARCH_MIPS 5610 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698