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

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

Issue 2951053003: VM(RegExp): Allow OSR optimization of RegExp :matcher functions. (Closed)
Patch Set: Fix bugs with stack growing and block pruning Created 3 years, 6 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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 5920 matching lines...) Expand 10 before | Expand all | Expand 10 after
5931 5931
5932 5932
5933 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5933 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5934 ASSERT(!compiler->is_optimizing()); 5934 ASSERT(!compiler->is_optimizing());
5935 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry()); 5935 __ BranchLinkPatchable(*StubCode::DebugStepCheck_entry());
5936 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); 5936 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos());
5937 compiler->RecordSafepoint(locs()); 5937 compiler->RecordSafepoint(locs());
5938 } 5938 }
5939 5939
5940 5940
5941 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary(Zone* zone,
5942 bool opt) const {
5943 const intptr_t kNumInputs = 1;
5944 const intptr_t kNumTemps = 0;
5945 LocationSummary* locs = new (zone)
5946 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
5947 locs->set_in(0, Location::RegisterLocation(T0));
5948 locs->set_out(0, Location::RegisterLocation(T0));
5949 return locs;
5950 }
5951
5952
5953 void GrowRegExpStackInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5954 const Register typed_data = locs()->in(0).reg();
5955 const Register result = locs()->out(0).reg();
5956 __ Comment("GrowRegExpStackInstr");
5957 __ addiu(SP, SP, Immediate(-2 * kWordSize));
5958 __ LoadObject(TMP, Object::null_object());
5959 __ sw(TMP, Address(SP, 1 * kWordSize));
5960 __ sw(typed_data, Address(SP, 0 * kWordSize));
5961 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
5962 kGrowRegExpStackRuntimeEntry, 1, locs());
5963 __ lw(result, Address(SP, 1 * kWordSize));
5964 __ addiu(SP, SP, Immediate(2 * kWordSize));
5965 }
5966
5967
5968 } // namespace dart 5941 } // namespace dart
5969 5942
5970 #endif // defined TARGET_ARCH_MIPS 5943 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698