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

Unified Diff: src/objects.cc

Issue 1196223002: Do not look for existing shared function info when compiling a new script. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index e4d58b7f57d1943a5c75099f69b3412e222fd8a6..f85a3d8a392d20728d47f459407ae3fae865b6de 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10436,8 +10436,7 @@ MaybeHandle<SharedFunctionInfo> Script::FindSharedFunctionInfo(
if (!obj->IsSharedFunctionInfo()) continue;
SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj);
if (fun->function_token_position() == shared->function_token_position() &&
- fun->start_position() == shared->start_position() &&
- fun->end_position() == shared->end_position()) {
+ fun->start_position() == shared->start_position()) {
return Handle<SharedFunctionInfo>(shared);
}
}
@@ -10461,11 +10460,15 @@ void SharedFunctionInfo::SetScript(Handle<SharedFunctionInfo> shared,
// Add shared function info to new script's list.
if (script_object->IsScript()) {
Handle<Script> script = Handle<Script>::cast(script_object);
- bool found = false;
Handle<Object> list(script->shared_function_infos(), shared->GetIsolate());
+#ifdef DEBUG
+ bool found = false;
list = WeakFixedArray::Add(list, shared, WeakFixedArray::kAddIfNotFound,
&found);
CHECK(!found);
+#else
+ list = WeakFixedArray::Add(list, shared, WeakFixedArray::kAlwaysAdd);
+#endif // DEBUG
script->set_shared_function_infos(*list);
}
// Finally set new script.
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698