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

Side by Side Diff: vm/code_generator.h

Issue 10824266: Remove functions_cache_ and it's references as it is not being used anymore. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 | vm/code_generator.cc » ('j') | no next file with comments »
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 V(DeoptNoTypeFeedback) \ 77 V(DeoptNoTypeFeedback) \
78 V(DeoptSAR) \ 78 V(DeoptSAR) \
79 V(DeoptUnaryOp) \ 79 V(DeoptUnaryOp) \
80 80
81 enum DeoptReasonId { 81 enum DeoptReasonId {
82 #define DEFINE_ENUM_LIST(name) k##name, 82 #define DEFINE_ENUM_LIST(name) k##name,
83 DEOPT_REASONS(DEFINE_ENUM_LIST) 83 DEOPT_REASONS(DEFINE_ENUM_LIST)
84 #undef DEFINE_ENUM_LIST 84 #undef DEFINE_ENUM_LIST
85 }; 85 };
86 86
87 // This class wraps around the array RawClass::functions_cache_.
88 // 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
90 // last entry being NULL to terminate its search.
91 // The compiled functions are added sequentially (except for the last entry
92 // being empty). Names of functions with variable number of arguments
93 // can appear several times, once for each valid argument count.
94 class FunctionsCache : public ValueObject {
95 public:
96 // Entries in the RawClass::functions_cache_. The size of initially allocated
97 // functions_cache_ array is (kInitialSize * kNumEntries).
98 enum Entries {
99 kFunctionName = 0,
100 kArgCount = 1,
101 kNamedArgCount = 2,
102 kFunction = 3,
103 kNumEntries = 4
104 };
105
106 explicit FunctionsCache(const Class& cls) : class_(cls) {}
107
108 void AddCompiledFunction(const Function& function,
109 int num_arguments,
110 int num_named_arguments);
111
112 // This is a testing function, the lookup (will) occur inlined in stub code.
113 RawCode* LookupCode(const String& function_name,
114 int num_arguments,
115 int num_named_arguments);
116
117 private:
118 static void EnterFunctionAt(int i,
119 const Array& cache,
120 const Function& function,
121 int num_arguments,
122 int num_named_arguments);
123
124 const Class& class_;
125 };
126
127 87
128 RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate, 88 RawCode* ResolveCompileInstanceCallTarget(Isolate* isolate,
129 const Instance& receiver); 89 const Instance& receiver);
130 90
131 } // namespace dart 91 } // namespace dart
132 92
133 #endif // VM_CODE_GENERATOR_H_ 93 #endif // VM_CODE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698