| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 30 matching lines...) Expand all Loading... |
| 41 DECLARE_RUNTIME_ENTRY(ReportObjectNotClosure); | 41 DECLARE_RUNTIME_ENTRY(ReportObjectNotClosure); |
| 42 DECLARE_RUNTIME_ENTRY(ResolveCompileInstanceFunction); | 42 DECLARE_RUNTIME_ENTRY(ResolveCompileInstanceFunction); |
| 43 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureFunction); | 43 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureFunction); |
| 44 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureThroughGetter); | 44 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureThroughGetter); |
| 45 DECLARE_RUNTIME_ENTRY(ReThrow); | 45 DECLARE_RUNTIME_ENTRY(ReThrow); |
| 46 DECLARE_RUNTIME_ENTRY(StackOverflow); | 46 DECLARE_RUNTIME_ENTRY(StackOverflow); |
| 47 DECLARE_RUNTIME_ENTRY(Throw); | 47 DECLARE_RUNTIME_ENTRY(Throw); |
| 48 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); | 48 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); |
| 49 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); | 49 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); |
| 50 | 50 |
| 51 enum DeoptReasonId { |
| 52 kDeoptUnknown, |
| 53 kDeoptIncrLocal, |
| 54 kDeoptIncrInstance, |
| 55 kDeoptIncrInstanceOneClass, |
| 56 kDeoptInstanceGetterSameTarget, |
| 57 kDeoptInstanceGetter, |
| 58 kDeoptStoreIndexed, |
| 59 kDeoptCheckedInstanceCallSmiOnly, |
| 60 kDeoptCheckedInstanceCallSmiFail, |
| 61 kDeoptCheckedInstanceCallCheckFail, |
| 62 kDeoptIntegerToDouble, |
| 63 kDeoptDoubleToDouble, |
| 64 kDeoptSmiBinaryOp, |
| 65 kDeoptMintBinaryOp, |
| 66 kDeoptDoubleBinaryOp, |
| 67 kDeoptInstanceSetterSameTarget, |
| 68 kDeoptInstanceSetter, |
| 69 kDeoptSmiEquality, |
| 70 kDeoptSmiCompareSmis, |
| 71 kDeoptSmiCompareAny, |
| 72 kDeoptEqualityNoFeedback, |
| 73 kDeoptEqualityClassCheck, |
| 74 kDeoptDoubleComparison, |
| 75 kDeoptLoadIndexedFixedArray, |
| 76 kDeoptLoadIndexedGrowableArray, |
| 77 }; |
| 51 | 78 |
| 52 // This class wraps around the array RawClass::functions_cache_. | 79 // This class wraps around the array RawClass::functions_cache_. |
| 53 // The structure of that array is specified by FunctionsCache::Entries. | 80 // The structure of that array is specified by FunctionsCache::Entries. |
| 54 // The last entry in the array is always NULL, the lookup code can rely on | 81 // The last entry in the array is always NULL, the lookup code can rely on |
| 55 // last entry being NULL to terminate its search. | 82 // last entry being NULL to terminate its search. |
| 56 // The compiled functions are added sequentially (except for the last entry | 83 // The compiled functions are added sequentially (except for the last entry |
| 57 // being empty). Names of functions with variable number of arguments | 84 // being empty). Names of functions with variable number of arguments |
| 58 // can appear several times, once for each valid argument count. | 85 // can appear several times, once for each valid argument count. |
| 59 class FunctionsCache : public ValueObject { | 86 class FunctionsCache : public ValueObject { |
| 60 public: | 87 public: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 85 const Function& function, | 112 const Function& function, |
| 86 int num_arguments, | 113 int num_arguments, |
| 87 int num_named_arguments); | 114 int num_named_arguments); |
| 88 | 115 |
| 89 const Class& class_; | 116 const Class& class_; |
| 90 }; | 117 }; |
| 91 | 118 |
| 92 } // namespace dart | 119 } // namespace dart |
| 93 | 120 |
| 94 #endif // VM_CODE_GENERATOR_H_ | 121 #endif // VM_CODE_GENERATOR_H_ |
| OLD | NEW |