Chromium Code Reviews| Index: src/compilation-cache.cc |
| diff --git a/src/compilation-cache.cc b/src/compilation-cache.cc |
| index 48b2870223208ea80e8d602d620b9136891c400c..3e1beb34c4ed637f19ea1cb43343d588e56d944c 100644 |
| --- a/src/compilation-cache.cc |
| +++ b/src/compilation-cache.cc |
| @@ -32,7 +32,7 @@ |
| namespace v8 { namespace internal { |
| enum { |
| - NUMBER_OF_ENTRY_KINDS = CompilationCache::EVAL_CONTEXTUAL + 1 |
| + NUMBER_OF_ENTRY_KINDS = CompilationCache::_LAST_ENTRY |
|
Kasper Lund
2008/10/24 06:42:50
LAST_ENTRY + 1
|
| }; |
| @@ -142,6 +142,22 @@ void CompilationCache::Associate(Handle<String> source, |
| } |
| +Handle<Object> CompilationCache::LookupRegExp(Handle<String> source, |
| + int flags) { |
| + Handle<CompilationCacheTable> table = GetTable(REGEXP); |
|
Kasper Lund
2008/10/24 06:42:50
Shouldn't this be tracking compilation cache misse
Kasper Lund
2008/10/24 06:42:50
Be careful not to leak the table handle into the s
|
| + return Handle<Object>(table->LookupRegExp(*source, flags)); |
|
Kasper Lund
2008/10/24 06:42:50
The return value is different from the other looku
|
| +} |
| + |
| + |
| +void CompilationCache::PutRegExp(Handle<String> source, |
| + int flags, |
| + Handle<FixedArray> data) { |
| + HandleScope scope; |
| + Handle<CompilationCacheTable> table = GetTable(REGEXP); |
| + CALL_HEAP_FUNCTION_VOID(table->PutRegExp(*source, flags, *data)); |
| +} |
| + |
| + |
| void CompilationCache::Clear() { |
| for (int i = 0; i < NUMBER_OF_ENTRY_KINDS; i++) { |
| tables[i] = Heap::undefined_value(); |