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

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

Issue 1992963002: Enable optimizer pipeline for DBC. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/code_patcher.h" 8 #include "vm/code_patcher.h"
9 9
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 13 matching lines...) Expand all
24 void CodePatcher::PatchStaticCallAt(uword return_address, 24 void CodePatcher::PatchStaticCallAt(uword return_address,
25 const Code& code, 25 const Code& code,
26 const Code& new_target) { 26 const Code& new_target) {
27 ASSERT(code.ContainsInstructionAt(return_address)); 27 ASSERT(code.ContainsInstructionAt(return_address));
28 CallPattern call(return_address, code); 28 CallPattern call(return_address, code);
29 call.SetTargetCode(new_target); 29 call.SetTargetCode(new_target);
30 } 30 }
31 31
32 32
33 void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) { 33 void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) {
34 // The inserted call should not overlap the lazy deopt jump code.
35 ASSERT(start + CallPattern::DeoptCallPatternLengthInBytes() <= target);
zra 2016/05/19 16:24:27 Is this removed because 'target' can be 0? Maybe a
Vyacheslav Egorov (Google) 2016/05/20 12:11:46 Done.
36 CallPattern::InsertDeoptCallAt(start, target); 34 CallPattern::InsertDeoptCallAt(start, target);
37 } 35 }
38 36
39 37
40 RawCode* CodePatcher::GetInstanceCallAt(uword return_address, 38 RawCode* CodePatcher::GetInstanceCallAt(uword return_address,
41 const Code& code, 39 const Code& code,
42 ICData* ic_data) { 40 ICData* ic_data) {
43 ASSERT(code.ContainsInstructionAt(return_address)); 41 ASSERT(code.ContainsInstructionAt(return_address));
44 CallPattern call(return_address, code); 42 CallPattern call(return_address, code);
45 if (ic_data != NULL) { 43 if (ic_data != NULL) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 NativeFunction* target) { 95 NativeFunction* target) {
98 ASSERT(code.ContainsInstructionAt(return_address)); 96 ASSERT(code.ContainsInstructionAt(return_address));
99 NativeCallPattern call(return_address, code); 97 NativeCallPattern call(return_address, code);
100 *target = call.native_function(); 98 *target = call.native_function();
101 return call.target(); 99 return call.target();
102 } 100 }
103 101
104 } // namespace dart 102 } // namespace dart
105 103
106 #endif // defined TARGET_ARCH_DBC 104 #endif // defined TARGET_ARCH_DBC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698