Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: runtime/vm/code_generator.h

Issue 10539068: Add righ shift test for corner cases, use macro for deopt reasons (all suggested by Slava in a prev… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | runtime/vm/code_generator.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 DECLARE_RUNTIME_ENTRY(ReportObjectNotClosure); 46 DECLARE_RUNTIME_ENTRY(ReportObjectNotClosure);
47 DECLARE_RUNTIME_ENTRY(ResolveCompileInstanceFunction); 47 DECLARE_RUNTIME_ENTRY(ResolveCompileInstanceFunction);
48 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureFunction); 48 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureFunction);
49 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureThroughGetter); 49 DECLARE_RUNTIME_ENTRY(ResolveImplicitClosureThroughGetter);
50 DECLARE_RUNTIME_ENTRY(ReThrow); 50 DECLARE_RUNTIME_ENTRY(ReThrow);
51 DECLARE_RUNTIME_ENTRY(StackOverflow); 51 DECLARE_RUNTIME_ENTRY(StackOverflow);
52 DECLARE_RUNTIME_ENTRY(Throw); 52 DECLARE_RUNTIME_ENTRY(Throw);
53 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry); 53 DECLARE_RUNTIME_ENTRY(TraceFunctionEntry);
54 DECLARE_RUNTIME_ENTRY(TraceFunctionExit); 54 DECLARE_RUNTIME_ENTRY(TraceFunctionExit);
55 55
56 #define DEOPT_REASONS(V) \
57 V(DeoptUnknown) \
58 V(DeoptIncrLocal) \
59 V(DeoptIncrInstance) \
60 V(DeoptIncrInstanceOneClass) \
61 V(DeoptInstanceGetterSameTarget) \
62 V(DeoptInstanceGetter) \
63 V(DeoptStoreIndexed) \
64 V(DeoptCheckedInstanceCallSmiOnly) \
65 V(DeoptCheckedInstanceCallSmiFail) \
66 V(DeoptCheckedInstanceCallCheckFail) \
67 V(DeoptIntegerToDouble) \
68 V(DeoptDoubleToDouble) \
69 V(DeoptSmiBinaryOp) \
70 V(DeoptMintBinaryOp) \
71 V(DeoptDoubleBinaryOp) \
72 V(DeoptInstanceSetterSameTarget) \
73 V(DeoptInstanceSetter) \
74 V(DeoptSmiEquality) \
75 V(DeoptSmiCompareSmis) \
76 V(DeoptSmiCompareAny) \
77 V(DeoptEqualityNoFeedback) \
78 V(DeoptEqualityClassCheck) \
79 V(DeoptDoubleComparison) \
80 V(DeoptLoadIndexedFixedArray) \
81 V(DeoptLoadIndexedGrowableArray) \
82 V(DeoptNoTypeFeedback) \
83 V(DeoptSAR) \
84 V(DeoptUnaryOp) \
85
56 enum DeoptReasonId { 86 enum DeoptReasonId {
57 kDeoptUnknown, 87 #define DEFINE_ENUM_LIST(name) k##name,
58 kDeoptIncrLocal, 88 DEOPT_REASONS(DEFINE_ENUM_LIST)
59 kDeoptIncrInstance, 89 #undef DEFINE_ENUM_LIST
60 kDeoptIncrInstanceOneClass,
61 kDeoptInstanceGetterSameTarget,
62 kDeoptInstanceGetter,
63 kDeoptStoreIndexed,
64 kDeoptCheckedInstanceCallSmiOnly,
65 kDeoptCheckedInstanceCallSmiFail,
66 kDeoptCheckedInstanceCallCheckFail,
67 kDeoptIntegerToDouble,
68 kDeoptDoubleToDouble,
69 kDeoptSmiBinaryOp,
70 kDeoptMintBinaryOp,
71 kDeoptDoubleBinaryOp,
72 kDeoptInstanceSetterSameTarget,
73 kDeoptInstanceSetter,
74 kDeoptSmiEquality,
75 kDeoptSmiCompareSmis,
76 kDeoptSmiCompareAny,
77 kDeoptEqualityNoFeedback,
78 kDeoptEqualityClassCheck,
79 kDeoptDoubleComparison,
80 kDeoptLoadIndexedFixedArray,
81 kDeoptLoadIndexedGrowableArray,
82 kDeoptNoTypeFeedback,
83 kDeoptSAR,
84 kDeoptUnaryOp,
85 }; 90 };
86 91
87 // This class wraps around the array RawClass::functions_cache_. 92 // This class wraps around the array RawClass::functions_cache_.
88 // The structure of that array is specified by FunctionsCache::Entries. 93 // The structure of that array is specified by FunctionsCache::Entries.
89 // The last entry in the array is always NULL, the lookup code can rely on 94 // The last entry in the array is always NULL, the lookup code can rely on
90 // last entry being NULL to terminate its search. 95 // last entry being NULL to terminate its search.
91 // The compiled functions are added sequentially (except for the last entry 96 // The compiled functions are added sequentially (except for the last entry
92 // being empty). Names of functions with variable number of arguments 97 // being empty). Names of functions with variable number of arguments
93 // can appear several times, once for each valid argument count. 98 // can appear several times, once for each valid argument count.
94 class FunctionsCache : public ValueObject { 99 class FunctionsCache : public ValueObject {
(...skipping 29 matching lines...) Expand all
124 const Class& class_; 129 const Class& class_;
125 }; 130 };
126 131
127 132
128 RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate, 133 RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate,
129 const Instance& receiver); 134 const Instance& receiver);
130 135
131 } // namespace dart 136 } // namespace dart
132 137
133 #endif // VM_CODE_GENERATOR_H_ 138 #endif // VM_CODE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | runtime/vm/code_generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698