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

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

Issue 148343005: A64: Synchronize with r18147. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/stub-cache.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 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 class ObjectLiteralProperty; 234 class ObjectLiteralProperty;
235 235
236 236
237 class TypeFeedbackOracle: public ZoneObject { 237 class TypeFeedbackOracle: public ZoneObject {
238 public: 238 public:
239 TypeFeedbackOracle(Handle<Code> code, 239 TypeFeedbackOracle(Handle<Code> code,
240 Handle<Context> native_context, 240 Handle<Context> native_context,
241 Isolate* isolate, 241 Isolate* isolate,
242 Zone* zone); 242 Zone* zone);
243 243
244 bool LoadIsMonomorphicNormal(Property* expr); 244 bool LoadIsMonomorphicNormal(TypeFeedbackId id);
245 bool LoadIsUninitialized(Property* expr); 245 bool LoadIsUninitialized(TypeFeedbackId id);
246 bool LoadIsPreMonomorphic(Property* expr); 246 bool LoadIsPreMonomorphic(TypeFeedbackId id);
247 bool LoadIsPolymorphic(Property* expr); 247 bool LoadIsPolymorphic(TypeFeedbackId id);
248 bool StoreIsUninitialized(TypeFeedbackId ast_id); 248 bool StoreIsUninitialized(TypeFeedbackId ast_id);
249 bool StoreIsMonomorphicNormal(TypeFeedbackId ast_id); 249 bool StoreIsMonomorphicNormal(TypeFeedbackId ast_id);
250 bool StoreIsPreMonomorphic(TypeFeedbackId ast_id); 250 bool StoreIsPreMonomorphic(TypeFeedbackId ast_id);
251 bool StoreIsKeyedPolymorphic(TypeFeedbackId ast_id); 251 bool StoreIsKeyedPolymorphic(TypeFeedbackId ast_id);
252 bool CallIsMonomorphic(Call* expr); 252 bool CallIsMonomorphic(Call* expr);
253 bool KeyedArrayCallIsHoley(Call* expr); 253 bool KeyedArrayCallIsHoley(Call* expr);
254 bool CallNewIsMonomorphic(CallNew* expr); 254 bool CallNewIsMonomorphic(CallNew* expr);
255 bool ObjectLiteralStoreIsMonomorphic(ObjectLiteralProperty* prop); 255 bool ObjectLiteralStoreIsMonomorphic(ObjectLiteralProperty* prop);
256 256
257 // TODO(1571) We can't use ForInStatement::ForInType as the return value due 257 // TODO(1571) We can't use ForInStatement::ForInType as the return value due
258 // to various cycles in our headers. 258 // to various cycles in our headers.
259 byte ForInType(ForInStatement* expr); 259 // TODO(rossberg): once all oracle access is removed from ast.cc, it should
260 // be possible.
261 byte ForInType(TypeFeedbackId id);
260 262
261 Handle<Map> LoadMonomorphicReceiverType(Property* expr); 263 Handle<Map> LoadMonomorphicReceiverType(TypeFeedbackId id);
262 Handle<Map> StoreMonomorphicReceiverType(TypeFeedbackId id); 264 Handle<Map> StoreMonomorphicReceiverType(TypeFeedbackId id);
263 265
264 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId ast_id); 266 KeyedAccessStoreMode GetStoreMode(TypeFeedbackId ast_id);
265 267
266 void LoadReceiverTypes(Property* expr, 268 void LoadReceiverTypes(TypeFeedbackId id,
267 Handle<String> name, 269 Handle<String> name,
268 SmallMapList* types); 270 SmallMapList* types);
269 void StoreReceiverTypes(Assignment* expr, 271 void StoreReceiverTypes(Assignment* expr,
270 Handle<String> name, 272 Handle<String> name,
271 SmallMapList* types); 273 SmallMapList* types);
272 void CallReceiverTypes(Call* expr, 274 void CallReceiverTypes(Call* expr,
273 Handle<String> name, 275 Handle<String> name,
274 CallKind call_kind, 276 CallKind call_kind,
275 SmallMapList* types); 277 SmallMapList* types);
276 void CollectKeyedReceiverTypes(TypeFeedbackId ast_id, 278 void CollectKeyedReceiverTypes(TypeFeedbackId ast_id,
277 SmallMapList* types); 279 SmallMapList* types);
278 void CollectPolymorphicStoreReceiverTypes(TypeFeedbackId ast_id, 280 void CollectPolymorphicStoreReceiverTypes(TypeFeedbackId ast_id,
279 SmallMapList* types); 281 SmallMapList* types);
280 282
283 void PropertyReceiverTypes(TypeFeedbackId id,
284 Handle<String> name,
285 SmallMapList* receiver_types,
286 bool* is_prototype);
287 void KeyedPropertyReceiverTypes(TypeFeedbackId id,
288 SmallMapList* receiver_types,
289 bool* is_string);
290 void CountReceiverTypes(TypeFeedbackId id,
291 SmallMapList* receiver_types);
292
281 static bool CanRetainOtherContext(Map* map, Context* native_context); 293 static bool CanRetainOtherContext(Map* map, Context* native_context);
282 static bool CanRetainOtherContext(JSFunction* function, 294 static bool CanRetainOtherContext(JSFunction* function,
283 Context* native_context); 295 Context* native_context);
284 296
285 void CollectPolymorphicMaps(Handle<Code> code, SmallMapList* types); 297 void CollectPolymorphicMaps(Handle<Code> code, SmallMapList* types);
286 298
287 CheckType GetCallCheckType(Call* expr); 299 CheckType GetCallCheckType(Call* expr);
288 Handle<JSFunction> GetCallTarget(Call* expr); 300 Handle<JSFunction> GetCallTarget(Call* expr);
289 Handle<JSFunction> GetCallNewTarget(CallNew* expr); 301 Handle<JSFunction> GetCallNewTarget(CallNew* expr);
290 Handle<Cell> GetCallNewAllocationInfoCell(CallNew* expr); 302 Handle<Cell> GetCallNewAllocationInfoCell(CallNew* expr);
291 303
292 Handle<Map> GetObjectLiteralStoreMap(ObjectLiteralProperty* prop); 304 Handle<Map> GetObjectLiteralStoreMap(ObjectLiteralProperty* prop);
293 305
294 bool LoadIsBuiltin(Property* expr, Builtins::Name id); 306 bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id);
295 bool LoadIsStub(Property* expr, ICStub* stub); 307 bool LoadIsStub(TypeFeedbackId id, ICStub* stub);
296 308
297 // TODO(1571) We can't use ToBooleanStub::Types as the return value because 309 // TODO(1571) We can't use ToBooleanStub::Types as the return value because
298 // of various cycles in our headers. Death to tons of implementations in 310 // of various cycles in our headers. Death to tons of implementations in
299 // headers!! :-P 311 // headers!! :-P
300 byte ToBooleanTypes(TypeFeedbackId id); 312 byte ToBooleanTypes(TypeFeedbackId id);
301 313
302 // Get type information for arithmetic operations and compares. 314 // Get type information for arithmetic operations and compares.
303 void BinaryType(TypeFeedbackId id, 315 void BinaryType(TypeFeedbackId id,
304 Handle<Type>* left, 316 Handle<Type>* left,
305 Handle<Type>* right, 317 Handle<Type>* right,
306 Handle<Type>* result, 318 Handle<Type>* result,
307 Maybe<int>* fixed_right_arg, 319 Maybe<int>* fixed_right_arg,
308 Token::Value operation); 320 Token::Value operation);
309 321
310 void CompareType(TypeFeedbackId id, 322 void CompareType(TypeFeedbackId id,
311 Handle<Type>* left, 323 Handle<Type>* left,
312 Handle<Type>* right, 324 Handle<Type>* right,
313 Handle<Type>* combined); 325 Handle<Type>* combined);
314 326
327 Handle<Type> CountType(TypeFeedbackId id);
328
315 Handle<Type> ClauseType(TypeFeedbackId id); 329 Handle<Type> ClauseType(TypeFeedbackId id);
316 330
317 Handle<Type> IncrementType(CountOperation* expr);
318
319 Zone* zone() const { return zone_; } 331 Zone* zone() const { return zone_; }
320 Isolate* isolate() const { return isolate_; } 332 Isolate* isolate() const { return isolate_; }
321 333
322 private: 334 private:
323 void CollectReceiverTypes(TypeFeedbackId ast_id, 335 void CollectReceiverTypes(TypeFeedbackId ast_id,
324 Handle<String> name, 336 Handle<String> name,
325 Code::Flags flags, 337 Code::Flags flags,
326 SmallMapList* types); 338 SmallMapList* types);
327 339
328 void SetInfo(TypeFeedbackId ast_id, Object* target); 340 void SetInfo(TypeFeedbackId ast_id, Object* target);
(...skipping 19 matching lines...) Expand all
348 Isolate* isolate_; 360 Isolate* isolate_;
349 Zone* zone_; 361 Zone* zone_;
350 Handle<UnseededNumberDictionary> dictionary_; 362 Handle<UnseededNumberDictionary> dictionary_;
351 363
352 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle); 364 DISALLOW_COPY_AND_ASSIGN(TypeFeedbackOracle);
353 }; 365 };
354 366
355 } } // namespace v8::internal 367 } } // namespace v8::internal
356 368
357 #endif // V8_TYPE_INFO_H_ 369 #endif // V8_TYPE_INFO_H_
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698