Commit c1d0f845 authored by Ben L. Titzer's avatar Ben L. Titzer

Refactor TypeFeedbackOracle to accept Handle<Name> instead of Handle<String>.

R=verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/979323005

Cr-Commit-Position: refs/heads/master@{#27111}
parent db2d31ab
...@@ -313,7 +313,7 @@ Type* TypeFeedbackOracle::CountType(TypeFeedbackId id) { ...@@ -313,7 +313,7 @@ Type* TypeFeedbackOracle::CountType(TypeFeedbackId id) {
void TypeFeedbackOracle::PropertyReceiverTypes(TypeFeedbackId id, void TypeFeedbackOracle::PropertyReceiverTypes(TypeFeedbackId id,
Handle<String> name, Handle<Name> name,
SmallMapList* receiver_types) { SmallMapList* receiver_types) {
receiver_types->Clear(); receiver_types->Clear();
Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC);
...@@ -343,7 +343,7 @@ void TypeFeedbackOracle::KeyedPropertyReceiverTypes( ...@@ -343,7 +343,7 @@ void TypeFeedbackOracle::KeyedPropertyReceiverTypes(
void TypeFeedbackOracle::PropertyReceiverTypes(FeedbackVectorICSlot slot, void TypeFeedbackOracle::PropertyReceiverTypes(FeedbackVectorICSlot slot,
Handle<String> name, Handle<Name> name,
SmallMapList* receiver_types) { SmallMapList* receiver_types) {
receiver_types->Clear(); receiver_types->Clear();
LoadICNexus nexus(feedback_vector_, slot); LoadICNexus nexus(feedback_vector_, slot);
...@@ -363,8 +363,9 @@ void TypeFeedbackOracle::KeyedPropertyReceiverTypes( ...@@ -363,8 +363,9 @@ void TypeFeedbackOracle::KeyedPropertyReceiverTypes(
} }
void TypeFeedbackOracle::AssignmentReceiverTypes( void TypeFeedbackOracle::AssignmentReceiverTypes(TypeFeedbackId id,
TypeFeedbackId id, Handle<String> name, SmallMapList* receiver_types) { Handle<Name> name,
SmallMapList* receiver_types) {
receiver_types->Clear(); receiver_types->Clear();
Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC);
CollectReceiverTypes(id, name, flags, receiver_types); CollectReceiverTypes(id, name, flags, receiver_types);
...@@ -388,7 +389,7 @@ void TypeFeedbackOracle::CountReceiverTypes(TypeFeedbackId id, ...@@ -388,7 +389,7 @@ void TypeFeedbackOracle::CountReceiverTypes(TypeFeedbackId id,
void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id,
Handle<String> name, Handle<Name> name,
Code::Flags flags, Code::Flags flags,
SmallMapList* types) { SmallMapList* types) {
Handle<Object> object = GetInfo(ast_id); Handle<Object> object = GetInfo(ast_id);
...@@ -401,7 +402,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, ...@@ -401,7 +402,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id,
template <class T> template <class T>
void TypeFeedbackOracle::CollectReceiverTypes(T* obj, Handle<String> name, void TypeFeedbackOracle::CollectReceiverTypes(T* obj, Handle<Name> name,
Code::Flags flags, Code::Flags flags,
SmallMapList* types) { SmallMapList* types) {
if (FLAG_collect_megamorphic_maps_from_stub_cache && if (FLAG_collect_megamorphic_maps_from_stub_cache &&
......
...@@ -42,9 +42,9 @@ class TypeFeedbackOracle: public ZoneObject { ...@@ -42,9 +42,9 @@ class TypeFeedbackOracle: public ZoneObject {
IcCheckType* key_type); IcCheckType* key_type);
void GetLoadKeyType(TypeFeedbackId id, IcCheckType* key_type); void GetLoadKeyType(TypeFeedbackId id, IcCheckType* key_type);
void PropertyReceiverTypes(TypeFeedbackId id, Handle<String> name, void PropertyReceiverTypes(TypeFeedbackId id, Handle<Name> name,
SmallMapList* receiver_types); SmallMapList* receiver_types);
void PropertyReceiverTypes(FeedbackVectorICSlot slot, Handle<String> name, void PropertyReceiverTypes(FeedbackVectorICSlot slot, Handle<Name> name,
SmallMapList* receiver_types); SmallMapList* receiver_types);
void KeyedPropertyReceiverTypes(TypeFeedbackId id, void KeyedPropertyReceiverTypes(TypeFeedbackId id,
SmallMapList* receiver_types, SmallMapList* receiver_types,
...@@ -53,8 +53,7 @@ class TypeFeedbackOracle: public ZoneObject { ...@@ -53,8 +53,7 @@ class TypeFeedbackOracle: public ZoneObject {
void KeyedPropertyReceiverTypes(FeedbackVectorICSlot slot, void KeyedPropertyReceiverTypes(FeedbackVectorICSlot slot,
SmallMapList* receiver_types, bool* is_string, SmallMapList* receiver_types, bool* is_string,
IcCheckType* key_type); IcCheckType* key_type);
void AssignmentReceiverTypes(TypeFeedbackId id, void AssignmentReceiverTypes(TypeFeedbackId id, Handle<Name> name,
Handle<String> name,
SmallMapList* receiver_types); SmallMapList* receiver_types);
void KeyedAssignmentReceiverTypes(TypeFeedbackId id, void KeyedAssignmentReceiverTypes(TypeFeedbackId id,
SmallMapList* receiver_types, SmallMapList* receiver_types,
...@@ -104,12 +103,10 @@ class TypeFeedbackOracle: public ZoneObject { ...@@ -104,12 +103,10 @@ class TypeFeedbackOracle: public ZoneObject {
Isolate* isolate() const { return isolate_; } Isolate* isolate() const { return isolate_; }
private: private:
void CollectReceiverTypes(TypeFeedbackId id, void CollectReceiverTypes(TypeFeedbackId id, Handle<Name> name,
Handle<String> name, Code::Flags flags, SmallMapList* types);
Code::Flags flags,
SmallMapList* types);
template <class T> template <class T>
void CollectReceiverTypes(T* obj, Handle<String> name, Code::Flags flags, void CollectReceiverTypes(T* obj, Handle<Name> name, Code::Flags flags,
SmallMapList* types); SmallMapList* types);
// Returns true if there is at least one string map and if // Returns true if there is at least one string map and if
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment