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

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

Issue 6880276: Use type info for count operation in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Switch back to generating Integer32 code for tagged case, instead of bailing out of compilation. Created 9 years, 8 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/hydrogen.cc ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 STRING_INDEX_OUT_OF_BOUNDS = 1 224 STRING_INDEX_OUT_OF_BOUNDS = 1
225 }; 225 };
226 226
227 227
228 // Forward declarations. 228 // Forward declarations.
229 class Assignment; 229 class Assignment;
230 class UnaryOperation; 230 class UnaryOperation;
231 class BinaryOperation; 231 class BinaryOperation;
232 class Call; 232 class Call;
233 class CompareOperation; 233 class CompareOperation;
234 class CountOperation;
234 class CompilationInfo; 235 class CompilationInfo;
235 class Property; 236 class Property;
236 class CaseClause; 237 class CaseClause;
237 238
238 class TypeFeedbackOracle BASE_EMBEDDED { 239 class TypeFeedbackOracle BASE_EMBEDDED {
239 public: 240 public:
240 TypeFeedbackOracle(Handle<Code> code, Handle<Context> global_context); 241 TypeFeedbackOracle(Handle<Code> code, Handle<Context> global_context);
241 242
242 bool LoadIsMonomorphic(Property* expr); 243 bool LoadIsMonomorphic(Property* expr);
243 bool StoreIsMonomorphic(Expression* expr); 244 bool StoreIsMonomorphic(Expression* expr);
(...skipping 12 matching lines...) Expand all
256 CheckType GetCallCheckType(Call* expr); 257 CheckType GetCallCheckType(Call* expr);
257 Handle<JSObject> GetPrototypeForPrimitiveCheck(CheckType check); 258 Handle<JSObject> GetPrototypeForPrimitiveCheck(CheckType check);
258 259
259 bool LoadIsBuiltin(Property* expr, Builtins::Name id); 260 bool LoadIsBuiltin(Property* expr, Builtins::Name id);
260 261
261 // Get type information for arithmetic operations and compares. 262 // Get type information for arithmetic operations and compares.
262 TypeInfo UnaryType(UnaryOperation* expr); 263 TypeInfo UnaryType(UnaryOperation* expr);
263 TypeInfo BinaryType(BinaryOperation* expr); 264 TypeInfo BinaryType(BinaryOperation* expr);
264 TypeInfo CompareType(CompareOperation* expr); 265 TypeInfo CompareType(CompareOperation* expr);
265 TypeInfo SwitchType(CaseClause* clause); 266 TypeInfo SwitchType(CaseClause* clause);
267 TypeInfo IncrementType(CountOperation* expr);
266 268
267 private: 269 private:
268 ZoneMapList* CollectReceiverTypes(unsigned ast_id, 270 ZoneMapList* CollectReceiverTypes(unsigned ast_id,
269 Handle<String> name, 271 Handle<String> name,
270 Code::Flags flags); 272 Code::Flags flags);
271 273
272 void SetInfo(unsigned ast_id, Object* target); 274 void SetInfo(unsigned ast_id, Object* target);
273 275
274 void PopulateMap(Handle<Code> code); 276 void PopulateMap(Handle<Code> code);
275 277
276 void CollectIds(Code* code, 278 void CollectIds(Code* code,
277 List<int>* code_positions, 279 List<int>* code_positions,
278 List<unsigned>* ast_ids); 280 List<unsigned>* ast_ids);
279 281
280 // Returns an element from the backing store. Returns undefined if 282 // Returns an element from the backing store. Returns undefined if
281 // there is no information. 283 // there is no information.
282 Handle<Object> GetInfo(unsigned ast_id); 284 Handle<Object> GetInfo(unsigned ast_id);
283 285
284 Handle<Context> global_context_; 286 Handle<Context> global_context_;
285 Handle<NumberDictionary> dictionary_; 287 Handle<NumberDictionary> dictionary_;
286 288
287 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); 289 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
288 }; 290 };
289 291
290 } } // namespace v8::internal 292 } } // namespace v8::internal
291 293
292 #endif // V8_TYPE_INFO_H_ 294 #endif // V8_TYPE_INFO_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698