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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 6630 matching lines...) Expand 10 before | Expand all | Expand 10 after
6641 6641
6642 6642
6643 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6643 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6644 ASSERT(!compiler->is_optimizing()); 6644 ASSERT(!compiler->is_optimizing());
6645 __ CallPatchable(*StubCode::DebugStepCheck_entry()); 6645 __ CallPatchable(*StubCode::DebugStepCheck_entry());
6646 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos()); 6646 compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos());
6647 compiler->RecordSafepoint(locs()); 6647 compiler->RecordSafepoint(locs());
6648 } 6648 }
6649 6649
6650 6650
6651 LocationSummary* GrowRegExpStackInstr::MakeLocationSummary(Zone* zone,
6652 bool opt) const {
6653 const intptr_t kNumInputs = 1;
6654 const intptr_t kNumTemps = 0;
6655 LocationSummary* locs = new (zone)
6656 LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kCall);
6657 locs->set_in(0, Location::RegisterLocation(RAX));
6658 locs->set_out(0, Location::RegisterLocation(RAX));
6659 return locs;
6660 }
6661
6662
6663 void GrowRegExpStackInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6664 const Register typed_data = locs()->in(0).reg();
6665 const Register result = locs()->out(0).reg();
6666 __ PushObject(Object::null_object());
6667 __ pushq(typed_data);
6668 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
6669 kGrowRegExpStackRuntimeEntry, 1, locs());
6670 __ Drop(1);
6671 __ popq(result);
6672 }
6673
6674
6675 } // namespace dart 6651 } // namespace dart
6676 6652
6677 #undef __ 6653 #undef __
6678 6654
6679 #endif // defined TARGET_ARCH_X64 6655 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698