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

Side by Side Diff: src/objects.h

Issue 872001: Fix code cache lookup for keyed IC's... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/ic.cc ('k') | src/objects.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2964 inline void ClearCodeCache(); 2964 inline void ClearCodeCache();
2965 2965
2966 // Update code cache. 2966 // Update code cache.
2967 Object* UpdateCodeCache(String* name, Code* code); 2967 Object* UpdateCodeCache(String* name, Code* code);
2968 2968
2969 // Returns the found code or undefined if absent. 2969 // Returns the found code or undefined if absent.
2970 Object* FindInCodeCache(String* name, Code::Flags flags); 2970 Object* FindInCodeCache(String* name, Code::Flags flags);
2971 2971
2972 // Returns the non-negative index of the code object if it is in the 2972 // Returns the non-negative index of the code object if it is in the
2973 // cache and -1 otherwise. 2973 // cache and -1 otherwise.
2974 int IndexInCodeCache(String* name, Code* code); 2974 int IndexInCodeCache(Object* name, Code* code);
2975 2975
2976 // Removes a code object from the code cache at the given index. 2976 // Removes a code object from the code cache at the given index.
2977 void RemoveFromCodeCache(String* name, Code* code, int index); 2977 void RemoveFromCodeCache(String* name, Code* code, int index);
2978 2978
2979 // For every transition in this map, makes the transition's 2979 // For every transition in this map, makes the transition's
2980 // target's prototype pointer point back to this map. 2980 // target's prototype pointer point back to this map.
2981 // This is undone in MarkCompactCollector::ClearNonLiveTransitions(). 2981 // This is undone in MarkCompactCollector::ClearNonLiveTransitions().
2982 void CreateBackPointers(); 2982 void CreateBackPointers();
2983 2983
2984 // Set all map transitions from this map to dead maps to null. 2984 // Set all map transitions from this map to dead maps to null.
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
3736 Object* Update(String* name, Code* code); 3736 Object* Update(String* name, Code* code);
3737 3737
3738 // Lookup code object in the cache. Returns code object if found and undefined 3738 // Lookup code object in the cache. Returns code object if found and undefined
3739 // if not. 3739 // if not.
3740 Object* Lookup(String* name, Code::Flags flags); 3740 Object* Lookup(String* name, Code::Flags flags);
3741 3741
3742 // Get the internal index of a code object in the cache. Returns -1 if the 3742 // Get the internal index of a code object in the cache. Returns -1 if the
3743 // code object is not in that cache. This index can be used to later call 3743 // code object is not in that cache. This index can be used to later call
3744 // RemoveByIndex. The cache cannot be modified between a call to GetIndex and 3744 // RemoveByIndex. The cache cannot be modified between a call to GetIndex and
3745 // RemoveByIndex. 3745 // RemoveByIndex.
3746 int GetIndex(String* name, Code* code); 3746 int GetIndex(Object* name, Code* code);
3747 3747
3748 // Remove an object from the cache with the provided internal index. 3748 // Remove an object from the cache with the provided internal index.
3749 void RemoveByIndex(String* name, Code* code, int index); 3749 void RemoveByIndex(Object* name, Code* code, int index);
3750 3750
3751 static inline CodeCache* cast(Object* obj); 3751 static inline CodeCache* cast(Object* obj);
3752 3752
3753 #ifdef DEBUG 3753 #ifdef DEBUG
3754 void CodeCachePrint(); 3754 void CodeCachePrint();
3755 void CodeCacheVerify(); 3755 void CodeCacheVerify();
3756 #endif 3756 #endif
3757 3757
3758 static const int kDefaultCacheOffset = HeapObject::kHeaderSize; 3758 static const int kDefaultCacheOffset = HeapObject::kHeaderSize;
3759 static const int kNormalTypeCacheOffset = 3759 static const int kNormalTypeCacheOffset =
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
5083 } else { 5083 } else {
5084 value &= ~(1 << bit_position); 5084 value &= ~(1 << bit_position);
5085 } 5085 }
5086 return value; 5086 return value;
5087 } 5087 }
5088 }; 5088 };
5089 5089
5090 } } // namespace v8::internal 5090 } } // namespace v8::internal
5091 5091
5092 #endif // V8_OBJECTS_H_ 5092 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698