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

Unified Diff: src/compiler.cc

Issue 10690043: Implement proper module linking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 8 years, 5 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/ast.cc ('k') | src/contexts.h » ('j') | src/full-codegen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index d35532f04583f2fcf6ba934d87d42cae3c481d4c..fd8872783b1ee7a7e31301abc3935eefc3c588f9 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -533,7 +533,7 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
info.SetLanguageMode(FLAG_harmony_scoping ? EXTENDED_MODE : STRICT_MODE);
}
result = MakeFunctionInfo(&info);
- if (extension == NULL && !result.is_null()) {
+ if (extension == NULL && !result.is_null() && !result->dont_cache()) {
compilation_cache->PutScript(source, result);
}
} else {
@@ -592,8 +592,10 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
// extended mode.
ASSERT(language_mode != EXTENDED_MODE ||
result->is_extended_mode());
- compilation_cache->PutEval(
- source, context, is_global, result, scope_position);
+ if (!result->dont_cache()) {
+ compilation_cache->PutEval(
+ source, context, is_global, result, scope_position);
+ }
}
} else {
if (result->ic_age() != HEAP->global_ic_age()) {
@@ -707,6 +709,7 @@ bool Compiler::CompileLazy(CompilationInfo* info) {
shared->set_code_age(0);
shared->set_dont_optimize(lit->flags()->Contains(kDontOptimize));
shared->set_dont_inline(lit->flags()->Contains(kDontInline));
+ shared->set_dont_cache(lit->flags()->Contains(kDontCache));
shared->set_ast_node_count(lit->ast_node_count());
if (V8::UseCrankshaft()&&
@@ -821,6 +824,7 @@ void Compiler::SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
function_info->set_is_function(lit->is_function());
function_info->set_dont_optimize(lit->flags()->Contains(kDontOptimize));
function_info->set_dont_inline(lit->flags()->Contains(kDontInline));
+ function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
}
« no previous file with comments | « src/ast.cc ('k') | src/contexts.h » ('j') | src/full-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698