| 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 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 DECLARE_RUNTIME_ENTRY(TraceICCall); | 43 DECLARE_RUNTIME_ENTRY(TraceICCall); |
| 44 DECLARE_RUNTIME_ENTRY(PatchStaticCall); | 44 DECLARE_RUNTIME_ENTRY(PatchStaticCall); |
| 45 DECLARE_RUNTIME_ENTRY(InvokeNonClosure); | 45 DECLARE_RUNTIME_ENTRY(InvokeNonClosure); |
| 46 DECLARE_RUNTIME_ENTRY(ReThrow); | 46 DECLARE_RUNTIME_ENTRY(ReThrow); |
| 47 DECLARE_RUNTIME_ENTRY(StackOverflow); | 47 DECLARE_RUNTIME_ENTRY(StackOverflow); |
| 48 DECLARE_RUNTIME_ENTRY(Throw); | 48 DECLARE_RUNTIME_ENTRY(Throw); |
| 49 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); | 49 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); |
| 50 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); | 50 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); |
| 51 DECLARE_RUNTIME_ENTRY(DeoptimizeMaterializeDoubles); | 51 DECLARE_RUNTIME_ENTRY(DeoptimizeMaterializeDoubles); |
| 52 DECLARE_RUNTIME_ENTRY(UpdateICDataTwoArgs); | 52 DECLARE_RUNTIME_ENTRY(UpdateICDataTwoArgs); |
| 53 DECLARE_RUNTIME_ENTRY(UpdateFieldCid); |
| 54 |
| 53 | 55 |
| 54 #define DEOPT_REASONS(V) \ | 56 #define DEOPT_REASONS(V) \ |
| 55 V(Unknown) \ | 57 V(Unknown) \ |
| 56 V(InstanceGetter) \ | 58 V(InstanceGetter) \ |
| 57 V(PolymorphicInstanceCallTestFail) \ | 59 V(PolymorphicInstanceCallTestFail) \ |
| 58 V(InstanceCallNoICData) \ | 60 V(InstanceCallNoICData) \ |
| 59 V(IntegerToDouble) \ | 61 V(IntegerToDouble) \ |
| 60 V(BinarySmiOp) \ | 62 V(BinarySmiOp) \ |
| 61 V(BinaryMintOp) \ | 63 V(BinaryMintOp) \ |
| 62 V(ShiftMintOp) \ | 64 V(ShiftMintOp) \ |
| 63 V(BinaryDoubleOp) \ | 65 V(BinaryDoubleOp) \ |
| 64 V(InstanceSetter) \ | 66 V(InstanceSetter) \ |
| 65 V(Equality) \ | 67 V(Equality) \ |
| 66 V(RelationalOp) \ | 68 V(RelationalOp) \ |
| 67 V(EqualityClassCheck) \ | 69 V(EqualityClassCheck) \ |
| 68 V(NoTypeFeedback) \ | 70 V(NoTypeFeedback) \ |
| 69 V(UnaryOp) \ | 71 V(UnaryOp) \ |
| 70 V(UnboxInteger) \ | 72 V(UnboxInteger) \ |
| 71 V(CheckClass) \ | 73 V(CheckClass) \ |
| 72 V(CheckSmi) \ | 74 V(CheckSmi) \ |
| 73 V(CheckArrayBound) \ | 75 V(CheckArrayBound) \ |
| 74 V(AtCall) \ | 76 V(AtCall) \ |
| 75 V(DoubleToSmi) \ | 77 V(DoubleToSmi) \ |
| 76 V(Int32Load) \ | 78 V(Int32Load) \ |
| 77 V(Uint32Load) \ | 79 V(Uint32Load) \ |
| 80 V(GuardField) \ |
| 78 V(NumReasons) \ | 81 V(NumReasons) \ |
| 79 | 82 |
| 80 enum DeoptReasonId { | 83 enum DeoptReasonId { |
| 81 #define DEFINE_ENUM_LIST(name) kDeopt##name, | 84 #define DEFINE_ENUM_LIST(name) kDeopt##name, |
| 82 DEOPT_REASONS(DEFINE_ENUM_LIST) | 85 DEOPT_REASONS(DEFINE_ENUM_LIST) |
| 83 #undef DEFINE_ENUM_LIST | 86 #undef DEFINE_ENUM_LIST |
| 84 }; | 87 }; |
| 85 | 88 |
| 86 | 89 |
| 87 const char* DeoptReasonToText(intptr_t deopt_id); | 90 const char* DeoptReasonToText(intptr_t deopt_id); |
| 88 | 91 |
| 89 | 92 |
| 90 RawCode* ResolveCompileInstanceCallTarget( | 93 RawCode* ResolveCompileInstanceCallTarget( |
| 91 const Instance& receiver, | 94 const Instance& receiver, |
| 92 const ICData& ic_data, | 95 const ICData& ic_data, |
| 93 const Array& arguments_descriptor); | 96 const Array& arguments_descriptor); |
| 94 | 97 |
| 98 void DeoptimizeAt(const Code& optimized_code, uword pc); |
| 95 void DeoptimizeAll(); | 99 void DeoptimizeAll(); |
| 96 void DeoptimizeIfOwner(const GrowableArray<intptr_t>& classes); | 100 void DeoptimizeIfOwner(const GrowableArray<intptr_t>& classes); |
| 97 | 101 |
| 98 double DartModulo(double a, double b); | 102 double DartModulo(double a, double b); |
| 99 | 103 |
| 100 } // namespace dart | 104 } // namespace dart |
| 101 | 105 |
| 102 #endif // VM_CODE_GENERATOR_H_ | 106 #endif // VM_CODE_GENERATOR_H_ |
| OLD | NEW |