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

Unified Diff: src/compilation-cache.cc

Issue 2156303002: Implement new Function.prototype.toString and fix CreateDynamicFunction parsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 3 years, 10 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/compilation-cache.h ('k') | src/compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-cache.cc
diff --git a/src/compilation-cache.cc b/src/compilation-cache.cc
index 15cf9ac28fa4546a6e86c50268195db37a306506..8b2e51e76a75c8b7d7c13e7a9ba65b0590c40615 100644
--- a/src/compilation-cache.cc
+++ b/src/compilation-cache.cc
@@ -194,8 +194,7 @@ void CompilationCacheScript::Put(Handle<String> source, Handle<Context> context,
InfoVectorPair CompilationCacheEval::Lookup(
Handle<String> source, Handle<SharedFunctionInfo> outer_info,
- Handle<Context> native_context, LanguageMode language_mode,
- int scope_position) {
+ Handle<Context> native_context, LanguageMode language_mode, int position) {
HandleScope scope(isolate());
// Make sure not to leak the table into the surrounding handle
// scope. Otherwise, we risk keeping old tables around even after
@@ -205,7 +204,7 @@ InfoVectorPair CompilationCacheEval::Lookup(
DCHECK(generations() == 1);
Handle<CompilationCacheTable> table = GetTable(generation);
result = table->LookupEval(source, outer_info, native_context, language_mode,
- scope_position);
+ position);
if (result.has_shared()) {
isolate()->counters()->compilation_cache_hits()->Increment();
} else {
@@ -218,12 +217,12 @@ void CompilationCacheEval::Put(Handle<String> source,
Handle<SharedFunctionInfo> outer_info,
Handle<SharedFunctionInfo> function_info,
Handle<Context> native_context,
- Handle<Cell> literals, int scope_position) {
+ Handle<Cell> literals, int position) {
HandleScope scope(isolate());
Handle<CompilationCacheTable> table = GetFirstTable();
table =
CompilationCacheTable::PutEval(table, source, outer_info, function_info,
- native_context, literals, scope_position);
+ native_context, literals, position);
SetFirstTable(table);
}
@@ -286,18 +285,18 @@ InfoVectorPair CompilationCache::LookupScript(
InfoVectorPair CompilationCache::LookupEval(
Handle<String> source, Handle<SharedFunctionInfo> outer_info,
- Handle<Context> context, LanguageMode language_mode, int scope_position) {
+ Handle<Context> context, LanguageMode language_mode, int position) {
InfoVectorPair result;
if (!IsEnabled()) return result;
if (context->IsNativeContext()) {
result = eval_global_.Lookup(source, outer_info, context, language_mode,
- scope_position);
+ position);
} else {
- DCHECK(scope_position != kNoSourcePosition);
+ DCHECK(position != kNoSourcePosition);
Handle<Context> native_context(context->native_context(), isolate());
result = eval_contextual_.Lookup(source, outer_info, native_context,
- language_mode, scope_position);
+ language_mode, position);
}
return result;
@@ -324,18 +323,18 @@ void CompilationCache::PutEval(Handle<String> source,
Handle<SharedFunctionInfo> outer_info,
Handle<Context> context,
Handle<SharedFunctionInfo> function_info,
- Handle<Cell> literals, int scope_position) {
+ Handle<Cell> literals, int position) {
if (!IsEnabled()) return;
HandleScope scope(isolate());
if (context->IsNativeContext()) {
eval_global_.Put(source, outer_info, function_info, context, literals,
- scope_position);
+ position);
} else {
- DCHECK(scope_position != kNoSourcePosition);
+ DCHECK(position != kNoSourcePosition);
Handle<Context> native_context(context->native_context(), isolate());
eval_contextual_.Put(source, outer_info, function_info, native_context,
- literals, scope_position);
+ literals, position);
}
}
« no previous file with comments | « src/compilation-cache.h ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698