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

Side by Side Diff: src/compiler.cc

Issue 687003005: Introduce phantom weak handles in the API and use them internally for debug info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/debug.h » ('j') | src/global-handles.cc » ('J')
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 // aggressive about lazy compilation, because it might trigger compilation 1301 // aggressive about lazy compilation, because it might trigger compilation
1302 // of functions without an outer context when setting a breakpoint through 1302 // of functions without an outer context when setting a breakpoint through
1303 // Debug::FindSharedFunctionInfoInScript. 1303 // Debug::FindSharedFunctionInfoInScript.
1304 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext(); 1304 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext();
1305 bool allow_lazy = literal->AllowsLazyCompilation() && 1305 bool allow_lazy = literal->AllowsLazyCompilation() &&
1306 !DebuggerWantsEagerCompilation(&info, allow_lazy_without_ctx); 1306 !DebuggerWantsEagerCompilation(&info, allow_lazy_without_ctx);
1307 1307
1308 1308
1309 if (outer_info->is_toplevel() && outer_info->will_serialize()) { 1309 if (outer_info->is_toplevel() && outer_info->will_serialize()) {
1310 // Make sure that if the toplevel code (possibly to be serialized), 1310 // Make sure that if the toplevel code (possibly to be serialized),
1311 // the inner unction must be allowed to be compiled lazily. 1311 // the inner function must be allowed to be compiled lazily.
1312 DCHECK(allow_lazy); 1312 DCHECK(allow_lazy);
1313 } 1313 }
1314 1314
1315 // Generate code 1315 // Generate code
1316 Handle<ScopeInfo> scope_info; 1316 Handle<ScopeInfo> scope_info;
1317 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) { 1317 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) {
1318 Handle<Code> code = isolate->builtins()->CompileLazy(); 1318 Handle<Code> code = isolate->builtins()->CompileLazy();
1319 info.SetCode(code); 1319 info.SetCode(code);
1320 scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate)); 1320 scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate));
1321 } else if (Renumber(&info) && FullCodeGenerator::MakeCode(&info)) { 1321 } else if (Renumber(&info) && FullCodeGenerator::MakeCode(&info)) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 AllowHandleDereference allow_deref; 1473 AllowHandleDereference allow_deref;
1474 bool tracing_on = info()->IsStub() 1474 bool tracing_on = info()->IsStub()
1475 ? FLAG_trace_hydrogen_stubs 1475 ? FLAG_trace_hydrogen_stubs
1476 : (FLAG_trace_hydrogen && 1476 : (FLAG_trace_hydrogen &&
1477 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1477 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1478 return (tracing_on && 1478 return (tracing_on &&
1479 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1479 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1480 } 1480 }
1481 1481
1482 } } // namespace v8::internal 1482 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/debug.h » ('j') | src/global-handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698