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

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

Issue 2149993006: DBC: Make unoptimized static calls call through ICData (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments 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/intermediate_language.cc ('k') | runtime/vm/isolate_reload.cc » ('j') | 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 } 393 }
394 394
395 intptr_t argument_count = ArgumentCount(); 395 intptr_t argument_count = ArgumentCount();
396 const Array& arguments_descriptor = 396 const Array& arguments_descriptor =
397 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, 397 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
398 argument_names())); 398 argument_names()));
399 const intptr_t argdesc_kidx = 399 const intptr_t argdesc_kidx =
400 compiler->assembler()->AddConstant(arguments_descriptor); 400 compiler->assembler()->AddConstant(arguments_descriptor);
401 __ StaticCall(argument_count, argdesc_kidx); 401 __ StaticCall(argument_count, argdesc_kidx);
402 compiler->RecordAfterCall(this); 402 compiler->RecordAfterCall(this);
403
404 if (compiler->is_optimizing()) { 403 if (compiler->is_optimizing()) {
405 __ PopLocal(locs()->out(0).reg()); 404 __ PopLocal(locs()->out(0).reg());
406 } 405 }
407 } 406 }
408 407
409 408
410 static void EmitBranchOnCondition(FlowGraphCompiler* compiler, 409 static void EmitBranchOnCondition(FlowGraphCompiler* compiler,
411 Condition true_condition, 410 Condition true_condition,
412 BranchLabels labels) { 411 BranchLabels labels) {
413 if (true_condition == NEXT_IS_TRUE) { 412 if (true_condition == NEXT_IS_TRUE) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 if (compiler->is_optimizing()) { 694 if (compiler->is_optimizing()) {
696 __ Push(locs()->in(0).reg()); 695 __ Push(locs()->in(0).reg());
697 } 696 }
698 const intptr_t kArgumentCount = 1; 697 const intptr_t kArgumentCount = 1;
699 const Array& arguments_descriptor = Array::Handle( 698 const Array& arguments_descriptor = Array::Handle(
700 ArgumentsDescriptor::New(kArgumentCount, Object::null_array())); 699 ArgumentsDescriptor::New(kArgumentCount, Object::null_array()));
701 __ PushConstant(CallFunction()); 700 __ PushConstant(CallFunction());
702 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); 701 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor);
703 __ StaticCall(kArgumentCount, argdesc_kidx); 702 __ StaticCall(kArgumentCount, argdesc_kidx);
704 compiler->RecordAfterCall(this); 703 compiler->RecordAfterCall(this);
705
706 if (compiler->is_optimizing()) { 704 if (compiler->is_optimizing()) {
707 __ PopLocal(locs()->out(0).reg()); 705 __ PopLocal(locs()->out(0).reg());
708 } 706 }
709 } 707 }
710 708
711 709
712 EMIT_NATIVE_CODE(NativeCall, 710 EMIT_NATIVE_CODE(NativeCall,
713 0, Location::NoLocation(), 711 0, Location::NoLocation(),
714 LocationSummary::kCall) { 712 LocationSummary::kCall) {
715 SetupNative(); 713 SetupNative();
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 __ IfULe(length, index); 1463 __ IfULe(length, index);
1466 compiler->EmitDeopt(deopt_id(), 1464 compiler->EmitDeopt(deopt_id(),
1467 ICData::kDeoptCheckArrayBound, 1465 ICData::kDeoptCheckArrayBound,
1468 (generalized_ ? ICData::kGeneralized : 0) | 1466 (generalized_ ? ICData::kGeneralized : 0) |
1469 (licm_hoisted_ ? ICData::kHoisted : 0)); 1467 (licm_hoisted_ ? ICData::kHoisted : 0));
1470 } 1468 }
1471 1469
1472 } // namespace dart 1470 } // namespace dart
1473 1471
1474 #endif // defined TARGET_ARCH_DBC 1472 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698