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

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

Issue 2162953005: DBC: A bit of Polymorphic instance call (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 236
237 237
238 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary( 238 LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary(
239 Zone* zone, bool optimizing) const { 239 Zone* zone, bool optimizing) const {
240 return MakeCallSummary(zone); 240 return MakeCallSummary(zone);
241 } 241 }
242 242
243 243
244 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 244 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
245 ASSERT(ic_data().NumArgsTested() == 1);
246 if (!with_checks()) {
247 ASSERT(ic_data().HasOneTarget());
248 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0));
249 const Array& arguments_descriptor =
250 Array::Handle(ArgumentsDescriptor::New(
251 instance_call()->ArgumentCount(),
252 instance_call()->argument_names()));
253 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor);
254
255 __ PushConstant(target);
256 __ StaticCall(instance_call()->ArgumentCount(), argdesc_kidx);
257 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther,
258 deopt_id(), instance_call()->token_pos());
259 compiler->RecordAfterCall(this);
260 __ PopLocal(locs()->out(0).reg());
261 return;
262 }
245 Unsupported(compiler); 263 Unsupported(compiler);
246 UNREACHABLE(); 264 UNREACHABLE();
247 } 265 }
248 266
249 267
250 EMIT_NATIVE_CODE(Stop, 0) { 268 EMIT_NATIVE_CODE(Stop, 0) {
251 __ Stop(message()); 269 __ Stop(message());
252 } 270 }
253 271
254 272
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 __ IfULe(length, index); 1481 __ IfULe(length, index);
1464 compiler->EmitDeopt(deopt_id(), 1482 compiler->EmitDeopt(deopt_id(),
1465 ICData::kDeoptCheckArrayBound, 1483 ICData::kDeoptCheckArrayBound,
1466 (generalized_ ? ICData::kGeneralized : 0) | 1484 (generalized_ ? ICData::kGeneralized : 0) |
1467 (licm_hoisted_ ? ICData::kHoisted : 0)); 1485 (licm_hoisted_ ? ICData::kHoisted : 0));
1468 } 1486 }
1469 1487
1470 } // namespace dart 1488 } // namespace dart
1471 1489
1472 #endif // defined TARGET_ARCH_DBC 1490 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698