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

Side by Side Diff: src/objects.h

Issue 8518001: Make eval compilation cache calling scope sensitive. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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
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 5825 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 static const int kPrefixSize = 0; 5836 static const int kPrefixSize = 0;
5837 static const int kEntrySize = 2; 5837 static const int kEntrySize = 2;
5838 }; 5838 };
5839 5839
5840 5840
5841 class CompilationCacheTable: public HashTable<CompilationCacheShape, 5841 class CompilationCacheTable: public HashTable<CompilationCacheShape,
5842 HashTableKey*> { 5842 HashTableKey*> {
5843 public: 5843 public:
5844 // Find cached value for a string key, otherwise return null. 5844 // Find cached value for a string key, otherwise return null.
5845 Object* Lookup(String* src); 5845 Object* Lookup(String* src);
5846 Object* LookupEval(String* src, Context* context, StrictModeFlag strict_mode); 5846 Object* LookupEval(String* src,
5847 Context* context,
5848 StrictModeFlag strict_mode,
5849 int scope_position);
5847 Object* LookupRegExp(String* source, JSRegExp::Flags flags); 5850 Object* LookupRegExp(String* source, JSRegExp::Flags flags);
5848 MaybeObject* Put(String* src, Object* value); 5851 MaybeObject* Put(String* src, Object* value);
5849 MaybeObject* PutEval(String* src, 5852 MaybeObject* PutEval(String* src,
5850 Context* context, 5853 Context* context,
5851 SharedFunctionInfo* value); 5854 SharedFunctionInfo* value,
5855 int scope_position);
5852 MaybeObject* PutRegExp(String* src, JSRegExp::Flags flags, FixedArray* value); 5856 MaybeObject* PutRegExp(String* src, JSRegExp::Flags flags, FixedArray* value);
5853 5857
5854 // Remove given value from cache. 5858 // Remove given value from cache.
5855 void Remove(Object* value); 5859 void Remove(Object* value);
5856 5860
5857 static inline CompilationCacheTable* cast(Object* obj); 5861 static inline CompilationCacheTable* cast(Object* obj);
5858 5862
5859 private: 5863 private:
5860 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable); 5864 DISALLOW_IMPLICIT_CONSTRUCTORS(CompilationCacheTable);
5861 }; 5865 };
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
7858 } else { 7862 } else {
7859 value &= ~(1 << bit_position); 7863 value &= ~(1 << bit_position);
7860 } 7864 }
7861 return value; 7865 return value;
7862 } 7866 }
7863 }; 7867 };
7864 7868
7865 } } // namespace v8::internal 7869 } } // namespace v8::internal
7866 7870
7867 #endif // V8_OBJECTS_H_ 7871 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698