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

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: 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
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 403 __ Nop(__ AddConstant(ICData::Handle()));
Vyacheslav Egorov (Google) 2016/07/18 13:52:46 Why it is done this way and not through OptimizedS
zra 2016/07/18 17:38:47 Done.
404 if (compiler->is_optimizing()) { 404 if (compiler->is_optimizing()) {
405 __ PopLocal(locs()->out(0).reg()); 405 __ PopLocal(locs()->out(0).reg());
406 } 406 }
407 } 407 }
408 408
409 409
410 static void EmitBranchOnCondition(FlowGraphCompiler* compiler, 410 static void EmitBranchOnCondition(FlowGraphCompiler* compiler,
411 Condition true_condition, 411 Condition true_condition,
412 BranchLabels labels) { 412 BranchLabels labels) {
413 if (true_condition == NEXT_IS_TRUE) { 413 if (true_condition == NEXT_IS_TRUE) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 if (compiler->is_optimizing()) { 695 if (compiler->is_optimizing()) {
696 __ Push(locs()->in(0).reg()); 696 __ Push(locs()->in(0).reg());
697 } 697 }
698 const intptr_t kArgumentCount = 1; 698 const intptr_t kArgumentCount = 1;
699 const Array& arguments_descriptor = Array::Handle( 699 const Array& arguments_descriptor = Array::Handle(
700 ArgumentsDescriptor::New(kArgumentCount, Object::null_array())); 700 ArgumentsDescriptor::New(kArgumentCount, Object::null_array()));
701 __ PushConstant(CallFunction()); 701 __ PushConstant(CallFunction());
702 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); 702 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor);
703 __ StaticCall(kArgumentCount, argdesc_kidx); 703 __ StaticCall(kArgumentCount, argdesc_kidx);
704 compiler->RecordAfterCall(this); 704 compiler->RecordAfterCall(this);
705 705 __ Nop(__ AddConstant(ICData::Handle()));
Vyacheslav Egorov (Google) 2016/07/18 13:52:46 Ditto.
zra 2016/07/18 17:38:47 Done.
706 if (compiler->is_optimizing()) { 706 if (compiler->is_optimizing()) {
707 __ PopLocal(locs()->out(0).reg()); 707 __ PopLocal(locs()->out(0).reg());
708 } 708 }
709 } 709 }
710 710
711 711
712 EMIT_NATIVE_CODE(NativeCall, 712 EMIT_NATIVE_CODE(NativeCall,
713 0, Location::NoLocation(), 713 0, Location::NoLocation(),
714 LocationSummary::kCall) { 714 LocationSummary::kCall) {
715 SetupNative(); 715 SetupNative();
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 __ IfULe(length, index); 1465 __ IfULe(length, index);
1466 compiler->EmitDeopt(deopt_id(), 1466 compiler->EmitDeopt(deopt_id(),
1467 ICData::kDeoptCheckArrayBound, 1467 ICData::kDeoptCheckArrayBound,
1468 (generalized_ ? ICData::kGeneralized : 0) | 1468 (generalized_ ? ICData::kGeneralized : 0) |
1469 (licm_hoisted_ ? ICData::kHoisted : 0)); 1469 (licm_hoisted_ ? ICData::kHoisted : 0));
1470 } 1470 }
1471 1471
1472 } // namespace dart 1472 } // namespace dart
1473 1473
1474 #endif // defined TARGET_ARCH_DBC 1474 #endif // defined TARGET_ARCH_DBC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698