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

Unified Diff: src/type-info.h

Issue 112863002: Merge bleeding_edge 18021:18297 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/token.h ('k') | src/type-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.h
diff --git a/src/type-info.h b/src/type-info.h
index a116971051eba074c2fe4b0f656bf74169140d4c..a0d32158445934a12d99b5d73603c79f8686bf11 100644
--- a/src/type-info.h
+++ b/src/type-info.h
@@ -218,20 +218,9 @@ enum StringStubFeedback {
// Forward declarations.
-// TODO(rossberg): these should all go away eventually.
-class Assignment;
-class Call;
-class CallNew;
-class CaseClause;
class CompilationInfo;
-class CountOperation;
-class Expression;
-class ForInStatement;
class ICStub;
-class Property;
class SmallMapList;
-class ObjectLiteral;
-class ObjectLiteralProperty;
class TypeFeedbackOracle: public ZoneObject {
@@ -241,58 +230,77 @@ class TypeFeedbackOracle: public ZoneObject {
Isolate* isolate,
Zone* zone);
- bool LoadIsMonomorphicNormal(Property* expr);
- bool LoadIsUninitialized(Property* expr);
- bool LoadIsPreMonomorphic(Property* expr);
- bool LoadIsPolymorphic(Property* expr);
- bool StoreIsUninitialized(TypeFeedbackId ast_id);
- bool StoreIsMonomorphicNormal(TypeFeedbackId ast_id);
- bool StoreIsPreMonomorphic(TypeFeedbackId ast_id);
- bool StoreIsKeyedPolymorphic(TypeFeedbackId ast_id);
- bool CallIsMonomorphic(Call* expr);
- bool KeyedArrayCallIsHoley(Call* expr);
- bool CallNewIsMonomorphic(CallNew* expr);
- bool ObjectLiteralStoreIsMonomorphic(ObjectLiteralProperty* prop);
+ bool LoadIsMonomorphicNormal(TypeFeedbackId id);
+ bool LoadIsUninitialized(TypeFeedbackId id);
+ bool LoadIsPreMonomorphic(TypeFeedbackId id);
+ bool LoadIsPolymorphic(TypeFeedbackId id);
+ bool StoreIsUninitialized(TypeFeedbackId id);
+ bool StoreIsMonomorphicNormal(TypeFeedbackId id);
+ bool StoreIsPreMonomorphic(TypeFeedbackId id);
+ bool StoreIsKeyedPolymorphic(TypeFeedbackId id);
+ bool CallIsMonomorphic(TypeFeedbackId aid);
+ bool KeyedArrayCallIsHoley(TypeFeedbackId id);
+ bool CallNewIsMonomorphic(TypeFeedbackId id);
+ bool ObjectLiteralStoreIsMonomorphic(TypeFeedbackId id);
// TODO(1571) We can't use ForInStatement::ForInType as the return value due
// to various cycles in our headers.
- byte ForInType(ForInStatement* expr);
+ // TODO(rossberg): once all oracle access is removed from ast.cc, it should
+ // be possible.
+ byte ForInType(TypeFeedbackId id);
- Handle<Map> LoadMonomorphicReceiverType(Property* expr);
+ Handle<Map> LoadMonomorphicReceiverType(TypeFeedbackId id);
Handle<Map> StoreMonomorphicReceiverType(TypeFeedbackId id);
- KeyedAccessStoreMode GetStoreMode(TypeFeedbackId ast_id);
+ KeyedAccessStoreMode GetStoreMode(TypeFeedbackId id);
- void LoadReceiverTypes(Property* expr,
+ void LoadReceiverTypes(TypeFeedbackId id,
Handle<String> name,
SmallMapList* types);
- void StoreReceiverTypes(Assignment* expr,
+ void StoreReceiverTypes(TypeFeedbackId id,
Handle<String> name,
SmallMapList* types);
- void CallReceiverTypes(Call* expr,
+ void CallReceiverTypes(TypeFeedbackId id,
Handle<String> name,
+ int arity,
CallKind call_kind,
SmallMapList* types);
- void CollectKeyedReceiverTypes(TypeFeedbackId ast_id,
+ void CollectKeyedReceiverTypes(TypeFeedbackId id,
SmallMapList* types);
- void CollectPolymorphicStoreReceiverTypes(TypeFeedbackId ast_id,
+ void CollectPolymorphicStoreReceiverTypes(TypeFeedbackId id,
SmallMapList* types);
+ void PropertyReceiverTypes(TypeFeedbackId id,
+ Handle<String> name,
+ SmallMapList* receiver_types,
+ bool* is_prototype);
+ void KeyedPropertyReceiverTypes(TypeFeedbackId id,
+ SmallMapList* receiver_types,
+ bool* is_string);
+ void AssignmentReceiverTypes(TypeFeedbackId id,
+ Handle<String> name,
+ SmallMapList* receiver_types);
+ void KeyedAssignmentReceiverTypes(TypeFeedbackId id,
+ SmallMapList* receiver_types,
+ KeyedAccessStoreMode* store_mode);
+ void CountReceiverTypes(TypeFeedbackId id,
+ SmallMapList* receiver_types);
+
static bool CanRetainOtherContext(Map* map, Context* native_context);
static bool CanRetainOtherContext(JSFunction* function,
Context* native_context);
void CollectPolymorphicMaps(Handle<Code> code, SmallMapList* types);
- CheckType GetCallCheckType(Call* expr);
- Handle<JSFunction> GetCallTarget(Call* expr);
- Handle<JSFunction> GetCallNewTarget(CallNew* expr);
- Handle<Cell> GetCallNewAllocationInfoCell(CallNew* expr);
+ CheckType GetCallCheckType(TypeFeedbackId id);
+ Handle<JSFunction> GetCallTarget(TypeFeedbackId id);
+ Handle<JSFunction> GetCallNewTarget(TypeFeedbackId id);
+ Handle<Cell> GetCallNewAllocationInfoCell(TypeFeedbackId id);
- Handle<Map> GetObjectLiteralStoreMap(ObjectLiteralProperty* prop);
+ Handle<Map> GetObjectLiteralStoreMap(TypeFeedbackId id);
- bool LoadIsBuiltin(Property* expr, Builtins::Name id);
- bool LoadIsStub(Property* expr, ICStub* stub);
+ bool LoadIsBuiltin(TypeFeedbackId id, Builtins::Name builtin_id);
+ bool LoadIsStub(TypeFeedbackId id, ICStub* stub);
// TODO(1571) We can't use ToBooleanStub::Types as the return value because
// of various cycles in our headers. Death to tons of implementations in
@@ -312,20 +320,20 @@ class TypeFeedbackOracle: public ZoneObject {
Handle<Type>* right,
Handle<Type>* combined);
- Handle<Type> ClauseType(TypeFeedbackId id);
+ Handle<Type> CountType(TypeFeedbackId id);
- Handle<Type> IncrementType(CountOperation* expr);
+ Handle<Type> ClauseType(TypeFeedbackId id);
Zone* zone() const { return zone_; }
Isolate* isolate() const { return isolate_; }
private:
- void CollectReceiverTypes(TypeFeedbackId ast_id,
+ void CollectReceiverTypes(TypeFeedbackId id,
Handle<String> name,
Code::Flags flags,
SmallMapList* types);
- void SetInfo(TypeFeedbackId ast_id, Object* target);
+ void SetInfo(TypeFeedbackId id, Object* target);
void BuildDictionary(Handle<Code> code);
void GetRelocInfos(Handle<Code> code, ZoneList<RelocInfo>* infos);
@@ -338,10 +346,10 @@ class TypeFeedbackOracle: public ZoneObject {
// Returns an element from the backing store. Returns undefined if
// there is no information.
- Handle<Object> GetInfo(TypeFeedbackId ast_id);
+ Handle<Object> GetInfo(TypeFeedbackId id);
// Return the cell that contains type feedback.
- Handle<Cell> GetInfoCell(TypeFeedbackId ast_id);
+ Handle<Cell> GetInfoCell(TypeFeedbackId id);
private:
Handle<Context> native_context_;
« no previous file with comments | « src/token.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698