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

Unified Diff: src/compilation-cache.cc

Issue 110203002: Refactor the compiling pipeline. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years 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 fffe5da71da80ed2e1006ab4b37b5a29a8556afc..a69ef4c7659320ac1db3a4239f92bd91275ea63b 100644
--- a/src/compilation-cache.cc
+++ b/src/compilation-cache.cc
@@ -421,7 +421,6 @@ Handle<SharedFunctionInfo> CompilationCache::LookupScript(
Handle<SharedFunctionInfo> CompilationCache::LookupEval(
Handle<String> source,
Handle<Context> context,
- bool is_global,
LanguageMode language_mode,
int scope_position) {
if (!IsEnabled()) {
@@ -429,7 +428,7 @@ Handle<SharedFunctionInfo> CompilationCache::LookupEval(
}
Handle<SharedFunctionInfo> result;
- if (is_global) {
+ if (context->IsNativeContext()) {
result = eval_global_.Lookup(
source, context, language_mode, scope_position);
} else {
@@ -454,9 +453,7 @@ Handle<FixedArray> CompilationCache::LookupRegExp(Handle<String> source,
void CompilationCache::PutScript(Handle<String> source,
Handle<Context> context,
Handle<SharedFunctionInfo> function_info) {
- if (!IsEnabled()) {
- return;
- }
+ if (!IsEnabled()) return;
script_.Put(source, context, function_info);
}
@@ -464,15 +461,12 @@ void CompilationCache::PutScript(Handle<String> source,
void CompilationCache::PutEval(Handle<String> source,
Handle<Context> context,
- bool is_global,
Handle<SharedFunctionInfo> function_info,
int scope_position) {
- if (!IsEnabled()) {
- return;
- }
+ if (!IsEnabled()) return;
HandleScope scope(isolate());
- if (is_global) {
+ if (context->IsNativeContext()) {
eval_global_.Put(source, context, function_info, scope_position);
} else {
ASSERT(scope_position != RelocInfo::kNoPosition);
« 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