Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
jit_call_specializer.h
Go to the documentation of this file.
1// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
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.
4
5#ifndef RUNTIME_VM_COMPILER_JIT_JIT_CALL_SPECIALIZER_H_
6#define RUNTIME_VM_COMPILER_JIT_JIT_CALL_SPECIALIZER_H_
7
8#if defined(DART_PRECOMPILED_RUNTIME)
9#error "AOT runtime should not use compiler sources (including header files)"
10#endif // defined(DART_PRECOMPILED_RUNTIME)
11
13
14namespace dart {
15
17 public:
19 SpeculativeInliningPolicy* speculative_policy);
20
22
23 virtual void VisitInstanceCall(InstanceCallInstr* instr);
24
25 // TODO(dartbug.com/30633) these methods have nothing to do with
26 // specialization of calls. They are here for historical reasons.
27 // Find a better place for them.
28 virtual void VisitAllocateContext(AllocateContextInstr* instr);
29 virtual void VisitCloneContext(CloneContextInstr* instr);
30
31 private:
32 virtual bool IsAllowedForInlining(intptr_t deopt_id) const;
33
35
36 void LowerContextAllocation(
37 Definition* instr,
38 const ZoneGrowableArray<const Slot*>& context_variables,
39 Value* context_value);
40
41 void ReplaceWithStaticCall(InstanceCallInstr* instr,
42 const Function& target,
43 intptr_t call_count);
44
46};
47
48} // namespace dart
49
50#endif // RUNTIME_VM_COMPILER_JIT_JIT_CALL_SPECIALIZER_H_
FlowGraph * flow_graph() const
virtual void VisitInstanceCall(InstanceCallInstr *instr)
virtual bool IsAllowedForInlining(intptr_t deopt_id) const
virtual void VisitCloneContext(CloneContextInstr *instr)
virtual bool TryOptimizeStaticCallUsingStaticTypes(StaticCallInstr *call)
virtual void VisitAllocateContext(AllocateContextInstr *instr)
uint32_t * target
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition globals.h:581