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

Unified Diff: src/compilation-cache.cc

Issue 3446028: Merge r5509, r5512, r5530 to 2.3 branch ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: '' Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-cache.cc
===================================================================
--- src/compilation-cache.cc (revision 5530)
+++ src/compilation-cache.cc (working copy)
@@ -110,6 +110,9 @@
void Put(Handle<String> source, Handle<SharedFunctionInfo> function_info);
private:
+ Object* TryTablePut(
+ Handle<String> source, Handle<SharedFunctionInfo> function_info);
+
// Note: Returns a new hash table if operation results in expansion.
Handle<CompilationCacheTable> TablePut(
Handle<String> source, Handle<SharedFunctionInfo> function_info);
@@ -137,6 +140,12 @@
Handle<SharedFunctionInfo> function_info);
private:
+ Object* TryTablePut(
+ Handle<String> source,
+ Handle<Context> context,
+ Handle<SharedFunctionInfo> function_info);
+
+
// Note: Returns a new hash table if operation results in expansion.
Handle<CompilationCacheTable> TablePut(
Handle<String> source,
@@ -159,6 +168,10 @@
JSRegExp::Flags flags,
Handle<FixedArray> data);
private:
+ Object* TryTablePut(Handle<String> source,
+ JSRegExp::Flags flags,
+ Handle<FixedArray> data);
+
// Note: Returns a new hash table if operation results in expansion.
Handle<CompilationCacheTable> TablePut(Handle<String> source,
JSRegExp::Flags flags,
@@ -320,11 +333,18 @@
}
+Object* CompilationCacheScript::TryTablePut(
+ Handle<String> source,
+ Handle<SharedFunctionInfo> function_info) {
+ Handle<CompilationCacheTable> table = GetFirstTable();
+ return table->Put(*source, *function_info);
+}
+
+
Handle<CompilationCacheTable> CompilationCacheScript::TablePut(
Handle<String> source,
Handle<SharedFunctionInfo> function_info) {
- CALL_HEAP_FUNCTION(GetFirstTable()->Put(*source, *function_info),
- CompilationCacheTable);
+ CALL_HEAP_FUNCTION(TryTablePut(source, function_info), CompilationCacheTable);
}
@@ -366,13 +386,20 @@
}
+Object* CompilationCacheEval::TryTablePut(
+ Handle<String> source,
+ Handle<Context> context,
+ Handle<SharedFunctionInfo> function_info) {
+ Handle<CompilationCacheTable> table = GetFirstTable();
+ return table->PutEval(*source, *context, *function_info);
+}
+
+
Handle<CompilationCacheTable> CompilationCacheEval::TablePut(
Handle<String> source,
Handle<Context> context,
Handle<SharedFunctionInfo> function_info) {
- CALL_HEAP_FUNCTION(GetFirstTable()->PutEval(*source,
- *context,
- *function_info),
+ CALL_HEAP_FUNCTION(TryTablePut(source, context, function_info),
CompilationCacheTable);
}
@@ -415,12 +442,20 @@
}
+Object* CompilationCacheRegExp::TryTablePut(
+ Handle<String> source,
+ JSRegExp::Flags flags,
+ Handle<FixedArray> data) {
+ Handle<CompilationCacheTable> table = GetFirstTable();
+ return table->PutRegExp(*source, flags, *data);
+}
+
+
Handle<CompilationCacheTable> CompilationCacheRegExp::TablePut(
Handle<String> source,
JSRegExp::Flags flags,
Handle<FixedArray> data) {
- CALL_HEAP_FUNCTION(GetFirstTable()->PutRegExp(*source, flags, *data),
- CompilationCacheTable);
+ CALL_HEAP_FUNCTION(TryTablePut(source, flags, data), CompilationCacheTable);
}
« no previous file with comments | « src/bootstrapper.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698