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

Side by Side Diff: src/compiler.cc

Issue 1973433002: Revert of [debugger] Prevent shared function info duplicates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/ast/ast-numbering.h" 9 #include "src/ast/ast-numbering.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 DCHECK(!isolate->has_pending_exception()); 1235 DCHECK(!isolate->has_pending_exception());
1236 DCHECK(shared->is_compiled()); 1236 DCHECK(shared->is_compiled());
1237 DCHECK(shared->HasDebugCode()); 1237 DCHECK(shared->HasDebugCode());
1238 return true; 1238 return true;
1239 } 1239 }
1240 1240
1241 bool Compiler::CompileForLiveEdit(Handle<Script> script) { 1241 bool Compiler::CompileForLiveEdit(Handle<Script> script) {
1242 Isolate* isolate = script->GetIsolate(); 1242 Isolate* isolate = script->GetIsolate();
1243 DCHECK(AllowCompilation::IsAllowed(isolate)); 1243 DCHECK(AllowCompilation::IsAllowed(isolate));
1244 1244
1245 // Get rid of old list of shared function infos.
1246 script->set_shared_function_infos(Smi::FromInt(0));
1247
1248 // Start a compilation. 1245 // Start a compilation.
1249 Zone zone(isolate->allocator()); 1246 Zone zone(isolate->allocator());
1250 ParseInfo parse_info(&zone, script); 1247 ParseInfo parse_info(&zone, script);
1251 CompilationInfo info(&parse_info, Handle<JSFunction>::null()); 1248 CompilationInfo info(&parse_info, Handle<JSFunction>::null());
1252 parse_info.set_global(); 1249 parse_info.set_global();
1253 info.MarkAsDebug(); 1250 info.MarkAsDebug();
1254 // TODO(635): support extensions. 1251 // TODO(635): support extensions.
1255 if (CompileToplevel(&info).is_null()) { 1252 if (CompileToplevel(&info).is_null()) {
1256 return false; 1253 return false;
1257 } 1254 }
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 MaybeHandle<Code> code; 1760 MaybeHandle<Code> code;
1764 if (cached.code != nullptr) code = handle(cached.code); 1761 if (cached.code != nullptr) code = handle(cached.code);
1765 Handle<Context> native_context(function->context()->native_context()); 1762 Handle<Context> native_context(function->context()->native_context());
1766 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code, 1763 SharedFunctionInfo::AddToOptimizedCodeMap(shared, native_context, code,
1767 literals, BailoutId::None()); 1764 literals, BailoutId::None());
1768 } 1765 }
1769 } 1766 }
1770 1767
1771 } // namespace internal 1768 } // namespace internal
1772 } // namespace v8 1769 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698