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

Side by Side Diff: src/compiler.cc

Issue 1279613008: Revert of Debugger: clear shared function info list when recompiling for liveedit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 1047
1048 void Compiler::CompileForLiveEdit(Handle<Script> script) { 1048 void Compiler::CompileForLiveEdit(Handle<Script> script) {
1049 // TODO(635): support extensions. 1049 // TODO(635): support extensions.
1050 Zone zone; 1050 Zone zone;
1051 ParseInfo parse_info(&zone, script); 1051 ParseInfo parse_info(&zone, script);
1052 CompilationInfo info(&parse_info); 1052 CompilationInfo info(&parse_info);
1053 PostponeInterruptsScope postpone(info.isolate()); 1053 PostponeInterruptsScope postpone(info.isolate());
1054 VMState<COMPILER> state(info.isolate()); 1054 VMState<COMPILER> state(info.isolate());
1055 1055
1056 // Get rid of old list of shared function infos. 1056 // Get rid of old list of shared function infos.
1057 script->set_shared_function_infos(Smi::FromInt(0));
1058 info.MarkAsFirstCompile(); 1057 info.MarkAsFirstCompile();
1059 info.parse_info()->set_global(); 1058 info.parse_info()->set_global();
1060 if (!Parser::ParseStatic(info.parse_info())) return; 1059 if (!Parser::ParseStatic(info.parse_info())) return;
1061 1060
1062 LiveEditFunctionTracker tracker(info.isolate(), info.function()); 1061 LiveEditFunctionTracker tracker(info.isolate(), info.function());
1063 if (!CompileUnoptimizedCode(&info)) return; 1062 if (!CompileUnoptimizedCode(&info)) return;
1064 if (info.has_shared_info()) { 1063 if (info.has_shared_info()) {
1065 Handle<ScopeInfo> scope_info = 1064 Handle<ScopeInfo> scope_info =
1066 ScopeInfo::Create(info.isolate(), info.zone(), info.scope()); 1065 ScopeInfo::Create(info.isolate(), info.zone(), info.scope());
1067 info.shared_info()->set_scope_info(*scope_info); 1066 info.shared_info()->set_scope_info(*scope_info);
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 1684
1686 1685
1687 #if DEBUG 1686 #if DEBUG
1688 void CompilationInfo::PrintAstForTesting() { 1687 void CompilationInfo::PrintAstForTesting() {
1689 PrintF("--- Source from AST ---\n%s\n", 1688 PrintF("--- Source from AST ---\n%s\n",
1690 PrettyPrinter(isolate(), zone()).PrintProgram(function())); 1689 PrettyPrinter(isolate(), zone()).PrintProgram(function()));
1691 } 1690 }
1692 #endif 1691 #endif
1693 } // namespace internal 1692 } // namespace internal
1694 } // namespace v8 1693 } // 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