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

Side by Side Diff: src/type-info.h

Issue 9571001: Introduce basic type feedback for for-in statements to avoid deopts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | « src/objects.h ('k') | src/type-info.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 class Call; 221 class Call;
222 class CallNew; 222 class CallNew;
223 class CaseClause; 223 class CaseClause;
224 class CompareOperation; 224 class CompareOperation;
225 class CompilationInfo; 225 class CompilationInfo;
226 class CountOperation; 226 class CountOperation;
227 class Expression; 227 class Expression;
228 class Property; 228 class Property;
229 class SmallMapList; 229 class SmallMapList;
230 class UnaryOperation; 230 class UnaryOperation;
231 class ForInStatement;
231 232
232 233
233 class TypeFeedbackOracle BASE_EMBEDDED { 234 class TypeFeedbackOracle BASE_EMBEDDED {
234 public: 235 public:
235 TypeFeedbackOracle(Handle<Code> code, 236 TypeFeedbackOracle(Handle<Code> code,
236 Handle<Context> global_context, 237 Handle<Context> global_context,
237 Isolate* isolate); 238 Isolate* isolate);
238 239
239 bool LoadIsMonomorphicNormal(Property* expr); 240 bool LoadIsMonomorphicNormal(Property* expr);
240 bool LoadIsMegamorphicWithTypeInfo(Property* expr); 241 bool LoadIsMegamorphicWithTypeInfo(Property* expr);
241 bool StoreIsMonomorphicNormal(Expression* expr); 242 bool StoreIsMonomorphicNormal(Expression* expr);
242 bool StoreIsMegamorphicWithTypeInfo(Expression* expr); 243 bool StoreIsMegamorphicWithTypeInfo(Expression* expr);
243 bool CallIsMonomorphic(Call* expr); 244 bool CallIsMonomorphic(Call* expr);
244 bool CallNewIsMonomorphic(CallNew* expr); 245 bool CallNewIsMonomorphic(CallNew* expr);
245 246
247 bool IsForInFastCase(ForInStatement* expr);
248
246 Handle<Map> LoadMonomorphicReceiverType(Property* expr); 249 Handle<Map> LoadMonomorphicReceiverType(Property* expr);
247 Handle<Map> StoreMonomorphicReceiverType(Expression* expr); 250 Handle<Map> StoreMonomorphicReceiverType(Expression* expr);
248 251
249 void LoadReceiverTypes(Property* expr, 252 void LoadReceiverTypes(Property* expr,
250 Handle<String> name, 253 Handle<String> name,
251 SmallMapList* types); 254 SmallMapList* types);
252 void StoreReceiverTypes(Assignment* expr, 255 void StoreReceiverTypes(Assignment* expr,
253 Handle<String> name, 256 Handle<String> name,
254 SmallMapList* types); 257 SmallMapList* types);
255 void CallReceiverTypes(Call* expr, 258 void CallReceiverTypes(Call* expr,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 Handle<Context> global_context_; 312 Handle<Context> global_context_;
310 Isolate* isolate_; 313 Isolate* isolate_;
311 Handle<UnseededNumberDictionary> dictionary_; 314 Handle<UnseededNumberDictionary> dictionary_;
312 315
313 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); 316 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
314 }; 317 };
315 318
316 } } // namespace v8::internal 319 } } // namespace v8::internal
317 320
318 #endif // V8_TYPE_INFO_H_ 321 #endif // V8_TYPE_INFO_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698