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

Side by Side Diff: runtime/vm/jit_optimizer.h

Issue 2716593002: Propagate this-specialization to regular (megamorphic) calls (Closed)
Patch Set: Created 3 years, 10 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef RUNTIME_VM_JIT_OPTIMIZER_H_ 5 #ifndef RUNTIME_VM_JIT_OPTIMIZER_H_
6 #define RUNTIME_VM_JIT_OPTIMIZER_H_ 6 #define RUNTIME_VM_JIT_OPTIMIZER_H_
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
(...skipping 26 matching lines...) Expand all
37 virtual void VisitAllocateContext(AllocateContextInstr* instr); 37 virtual void VisitAllocateContext(AllocateContextInstr* instr);
38 virtual void VisitLoadCodeUnits(LoadCodeUnitsInstr* instr); 38 virtual void VisitLoadCodeUnits(LoadCodeUnitsInstr* instr);
39 39
40 void InsertBefore(Instruction* next, 40 void InsertBefore(Instruction* next,
41 Instruction* instr, 41 Instruction* instr,
42 Environment* env, 42 Environment* env,
43 FlowGraph::UseKind use_kind) { 43 FlowGraph::UseKind use_kind) {
44 flow_graph_->InsertBefore(next, instr, env, use_kind); 44 flow_graph_->InsertBefore(next, instr, env, use_kind);
45 } 45 }
46 46
47 static const ICData& TrySpecializeICData(const ICData& ic_data, intptr_t cid);
48
47 private: 49 private:
48 // Attempt to build ICData for call using propagated class-ids. 50 // Attempt to build ICData for call using propagated class-ids.
49 bool TryCreateICData(InstanceCallInstr* call); 51 bool TryCreateICData(InstanceCallInstr* call);
50 const ICData& TrySpecializeICData(const ICData& ic_data, intptr_t cid);
51 52
52 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call); 53 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call);
53 54
54 bool TryReplaceWithIndexedOp(InstanceCallInstr* call); 55 bool TryReplaceWithIndexedOp(InstanceCallInstr* call);
55 56
56 57
57 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind); 58 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind);
58 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind); 59 bool TryReplaceWithUnaryOp(InstanceCallInstr* call, Token::Kind op_kind);
59 60
60 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind); 61 bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 FlowGraph* flow_graph_; 128 FlowGraph* flow_graph_;
128 129
129 DISALLOW_COPY_AND_ASSIGN(JitOptimizer); 130 DISALLOW_COPY_AND_ASSIGN(JitOptimizer);
130 }; 131 };
131 132
132 133
133 } // namespace dart 134 } // namespace dart
134 135
135 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_ 136 #endif // RUNTIME_VM_JIT_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698