| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 DECLARE_RUNTIME_ENTRY(ReThrow); | 42 DECLARE_RUNTIME_ENTRY(ReThrow); |
| 43 DECLARE_RUNTIME_ENTRY(StackOverflow); | 43 DECLARE_RUNTIME_ENTRY(StackOverflow); |
| 44 DECLARE_RUNTIME_ENTRY(Throw); | 44 DECLARE_RUNTIME_ENTRY(Throw); |
| 45 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); | 45 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); |
| 46 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); | 46 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); |
| 47 DECLARE_RUNTIME_ENTRY(DeoptimizeMaterializeDoubles); | 47 DECLARE_RUNTIME_ENTRY(DeoptimizeMaterializeDoubles); |
| 48 DECLARE_RUNTIME_ENTRY(UpdateICDataTwoArgs); | 48 DECLARE_RUNTIME_ENTRY(UpdateICDataTwoArgs); |
| 49 | 49 |
| 50 #define DEOPT_REASONS(V) \ | 50 #define DEOPT_REASONS(V) \ |
| 51 V(Unknown) \ | 51 V(Unknown) \ |
| 52 V(IncrLocal) \ |
| 53 V(IncrInstance) \ |
| 54 V(IncrInstanceOneClass) \ |
| 55 V(InstanceGetterSameTarget) \ |
| 52 V(InstanceGetter) \ | 56 V(InstanceGetter) \ |
| 57 V(StoreIndexed) \ |
| 58 V(StoreIndexedPolymorphic) \ |
| 59 V(PolymorphicInstanceCallSmiOnly) \ |
| 60 V(PolymorphicInstanceCallSmiFail) \ |
| 53 V(PolymorphicInstanceCallTestFail) \ | 61 V(PolymorphicInstanceCallTestFail) \ |
| 54 V(InstanceCallNoICData) \ | 62 V(InstanceCallNoICData) \ |
| 55 V(IntegerToDouble) \ | 63 V(IntegerToDouble) \ |
| 56 V(BinarySmiOp) \ | 64 V(BinarySmiOp) \ |
| 57 V(BinaryMintOp) \ | 65 V(BinaryMintOp) \ |
| 58 V(ShiftMintOp) \ | 66 V(ShiftMintOp) \ |
| 59 V(BinaryDoubleOp) \ | 67 V(BinaryDoubleOp) \ |
| 68 V(InstanceSetterSameTarget) \ |
| 60 V(InstanceSetter) \ | 69 V(InstanceSetter) \ |
| 70 V(SmiEquality) \ |
| 61 V(Equality) \ | 71 V(Equality) \ |
| 62 V(RelationalOp) \ | 72 V(RelationalOp) \ |
| 73 V(SmiCompareSmi) \ |
| 74 V(SmiCompareAny) \ |
| 75 V(DoubleCompareDouble) \ |
| 76 V(EqualityNoFeedback) \ |
| 63 V(EqualityClassCheck) \ | 77 V(EqualityClassCheck) \ |
| 78 V(DoubleComparison) \ |
| 79 V(LoadIndexedFixedArray) \ |
| 80 V(LoadIndexedGrowableArray) \ |
| 81 V(LoadIndexedPolymorphic) \ |
| 64 V(NoTypeFeedback) \ | 82 V(NoTypeFeedback) \ |
| 65 V(UnaryOp) \ | 83 V(UnaryOp) \ |
| 66 V(UnboxInteger) \ | 84 V(UnboxInteger) \ |
| 67 V(CheckClass) \ | 85 V(CheckClass) \ |
| 68 V(CheckSmi) \ | 86 V(CheckSmi) \ |
| 69 V(CheckArrayBound) \ | 87 V(CheckArrayBound) \ |
| 70 V(AtCall) \ | 88 V(AtCall) \ |
| 71 V(NumReasons) \ | 89 V(NumReasons) \ |
| 72 | 90 |
| 73 enum DeoptReasonId { | 91 enum DeoptReasonId { |
| 74 #define DEFINE_ENUM_LIST(name) kDeopt##name, | 92 #define DEFINE_ENUM_LIST(name) kDeopt##name, |
| 75 DEOPT_REASONS(DEFINE_ENUM_LIST) | 93 DEOPT_REASONS(DEFINE_ENUM_LIST) |
| 76 #undef DEFINE_ENUM_LIST | 94 #undef DEFINE_ENUM_LIST |
| 77 }; | 95 }; |
| 78 | 96 |
| 79 | 97 |
| 80 const char* DeoptReasonToText(intptr_t deopt_id); | 98 const char* DeoptReasonToText(intptr_t deopt_id); |
| 81 | 99 |
| 82 | 100 |
| 83 RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate, | 101 RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate, |
| 84 const Instance& receiver); | 102 const Instance& receiver); |
| 85 | 103 |
| 86 void DeoptimizeAll(); | 104 void DeoptimizeAll(); |
| 87 | 105 |
| 88 } // namespace dart | 106 } // namespace dart |
| 89 | 107 |
| 90 #endif // VM_CODE_GENERATOR_H_ | 108 #endif // VM_CODE_GENERATOR_H_ |
| OLD | NEW |