OLD | NEW |
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 VM_CODE_GENERATOR_H_ | 5 #ifndef VM_CODE_GENERATOR_H_ |
6 #define VM_CODE_GENERATOR_H_ | 6 #define VM_CODE_GENERATOR_H_ |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #include "vm/runtime_entry.h" | 9 #include "vm/runtime_entry.h" |
10 | 10 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 class Array; | 13 class Array; |
14 template <typename T> class GrowableArray; | 14 template <typename T> class GrowableArray; |
15 class ICData; | 15 class ICData; |
16 class Instance; | 16 class Instance; |
17 | 17 |
18 // Declaration of runtime entries called from stub or generated code. | 18 // Declaration of runtime entries called from stub or generated code. |
19 DECLARE_RUNTIME_ENTRY(AllocateArray); | 19 DECLARE_RUNTIME_ENTRY(AllocateArray); |
20 DECLARE_RUNTIME_ENTRY(AllocateClosure); | 20 DECLARE_RUNTIME_ENTRY(AllocateClosure); |
21 DECLARE_RUNTIME_ENTRY(AllocateImplicitInstanceClosure); | 21 DECLARE_RUNTIME_ENTRY(AllocateImplicitInstanceClosure); |
22 DECLARE_RUNTIME_ENTRY(AllocateContext); | 22 DECLARE_RUNTIME_ENTRY(AllocateContext); |
23 DECLARE_RUNTIME_ENTRY(AllocateObject); | 23 DECLARE_RUNTIME_ENTRY(AllocateObject); |
24 DECLARE_RUNTIME_ENTRY(AllocateObjectWithBoundsCheck); | 24 DECLARE_RUNTIME_ENTRY(AllocateObjectWithBoundsCheck); |
25 DECLARE_RUNTIME_ENTRY(ArgumentDefinitionTest); | |
26 DECLARE_RUNTIME_ENTRY(BreakpointRuntimeHandler); | 25 DECLARE_RUNTIME_ENTRY(BreakpointRuntimeHandler); |
27 DECLARE_RUNTIME_ENTRY(BreakpointStaticHandler); | 26 DECLARE_RUNTIME_ENTRY(BreakpointStaticHandler); |
28 DECLARE_RUNTIME_ENTRY(BreakpointReturnHandler); | 27 DECLARE_RUNTIME_ENTRY(BreakpointReturnHandler); |
29 DECLARE_RUNTIME_ENTRY(BreakpointDynamicHandler); | 28 DECLARE_RUNTIME_ENTRY(BreakpointDynamicHandler); |
30 DECLARE_RUNTIME_ENTRY(SingleStepHandler); | 29 DECLARE_RUNTIME_ENTRY(SingleStepHandler); |
31 DECLARE_RUNTIME_ENTRY(CloneContext); | 30 DECLARE_RUNTIME_ENTRY(CloneContext); |
32 DECLARE_RUNTIME_ENTRY(Deoptimize); | 31 DECLARE_RUNTIME_ENTRY(Deoptimize); |
33 DECLARE_RUNTIME_ENTRY(FixCallersTarget); | 32 DECLARE_RUNTIME_ENTRY(FixCallersTarget); |
34 DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerOneArg); | 33 DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerOneArg); |
35 DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerTwoArgs); | 34 DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerTwoArgs); |
36 DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerThreeArgs); | 35 DECLARE_RUNTIME_ENTRY(InlineCacheMissHandlerThreeArgs); |
37 DECLARE_RUNTIME_ENTRY(StaticCallMissHandlerTwoArgs); | 36 DECLARE_RUNTIME_ENTRY(StaticCallMissHandlerTwoArgs); |
38 DECLARE_RUNTIME_ENTRY(InstanceFunctionLookup); | 37 DECLARE_RUNTIME_ENTRY(InstanceFunctionLookup); |
39 DECLARE_RUNTIME_ENTRY(Instanceof); | 38 DECLARE_RUNTIME_ENTRY(Instanceof); |
| 39 DECLARE_RUNTIME_ENTRY(TypeCheck); |
| 40 DECLARE_RUNTIME_ENTRY(MalformedTypeError); |
| 41 DECLARE_RUNTIME_ENTRY(ConditionTypeError); |
40 DECLARE_RUNTIME_ENTRY(InstantiateType); | 42 DECLARE_RUNTIME_ENTRY(InstantiateType); |
41 DECLARE_RUNTIME_ENTRY(InstantiateTypeArguments); | 43 DECLARE_RUNTIME_ENTRY(InstantiateTypeArguments); |
42 DECLARE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction); | 44 DECLARE_RUNTIME_ENTRY(InvokeNoSuchMethodFunction); |
43 DECLARE_RUNTIME_ENTRY(MegamorphicCacheMissHandler); | 45 DECLARE_RUNTIME_ENTRY(MegamorphicCacheMissHandler); |
44 DECLARE_RUNTIME_ENTRY(OptimizeInvokedFunction); | 46 DECLARE_RUNTIME_ENTRY(OptimizeInvokedFunction); |
45 DECLARE_RUNTIME_ENTRY(TraceICCall); | 47 DECLARE_RUNTIME_ENTRY(TraceICCall); |
46 DECLARE_RUNTIME_ENTRY(PatchStaticCall); | 48 DECLARE_RUNTIME_ENTRY(PatchStaticCall); |
47 DECLARE_RUNTIME_ENTRY(InvokeNonClosure); | 49 DECLARE_RUNTIME_ENTRY(InvokeNonClosure); |
48 DECLARE_RUNTIME_ENTRY(ReThrow); | 50 DECLARE_RUNTIME_ENTRY(ReThrow); |
49 DECLARE_RUNTIME_ENTRY(StackOverflow); | 51 DECLARE_RUNTIME_ENTRY(StackOverflow); |
50 DECLARE_RUNTIME_ENTRY(Throw); | 52 DECLARE_RUNTIME_ENTRY(Throw); |
51 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); | 53 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); |
52 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); | 54 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); |
53 DECLARE_RUNTIME_ENTRY(DeoptimizeMaterialize); | 55 DECLARE_RUNTIME_ENTRY(DeoptimizeMaterialize); |
54 DECLARE_RUNTIME_ENTRY(UpdateICDataTwoArgs); | 56 DECLARE_RUNTIME_ENTRY(UpdateICDataTwoArgs); |
55 DECLARE_RUNTIME_ENTRY(UpdateFieldCid); | 57 DECLARE_RUNTIME_ENTRY(UpdateFieldCid); |
56 | 58 |
57 | |
58 #define DEOPT_REASONS(V) \ | 59 #define DEOPT_REASONS(V) \ |
59 V(Unknown) \ | 60 V(Unknown) \ |
60 V(InstanceGetter) \ | 61 V(InstanceGetter) \ |
61 V(PolymorphicInstanceCallTestFail) \ | 62 V(PolymorphicInstanceCallTestFail) \ |
62 V(InstanceCallNoICData) \ | 63 V(InstanceCallNoICData) \ |
63 V(IntegerToDouble) \ | 64 V(IntegerToDouble) \ |
64 V(BinarySmiOp) \ | 65 V(BinarySmiOp) \ |
65 V(BinaryMintOp) \ | 66 V(BinaryMintOp) \ |
66 V(UnaryMintOp) \ | 67 V(UnaryMintOp) \ |
67 V(ShiftMintOp) \ | 68 V(ShiftMintOp) \ |
(...skipping 30 matching lines...) Expand all Loading... |
98 | 99 |
99 void DeoptimizeAt(const Code& optimized_code, uword pc); | 100 void DeoptimizeAt(const Code& optimized_code, uword pc); |
100 void DeoptimizeAll(); | 101 void DeoptimizeAll(); |
101 void DeoptimizeIfOwner(const GrowableArray<intptr_t>& classes); | 102 void DeoptimizeIfOwner(const GrowableArray<intptr_t>& classes); |
102 | 103 |
103 double DartModulo(double a, double b); | 104 double DartModulo(double a, double b); |
104 | 105 |
105 } // namespace dart | 106 } // namespace dart |
106 | 107 |
107 #endif // VM_CODE_GENERATOR_H_ | 108 #endif // VM_CODE_GENERATOR_H_ |
OLD | NEW |