OLD | NEW |
---|---|
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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1276 // aggressive about lazy compilation, because it might trigger compilation | 1276 // aggressive about lazy compilation, because it might trigger compilation |
1277 // of functions without an outer context when setting a breakpoint through | 1277 // of functions without an outer context when setting a breakpoint through |
1278 // Debug::FindSharedFunctionInfoInScript. | 1278 // Debug::FindSharedFunctionInfoInScript. |
1279 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext(); | 1279 bool allow_lazy_without_ctx = literal->AllowsLazyCompilationWithoutContext(); |
1280 bool allow_lazy = literal->AllowsLazyCompilation() && | 1280 bool allow_lazy = literal->AllowsLazyCompilation() && |
1281 !DebuggerWantsEagerCompilation(&info, allow_lazy_without_ctx); | 1281 !DebuggerWantsEagerCompilation(&info, allow_lazy_without_ctx); |
1282 | 1282 |
1283 | 1283 |
1284 if (outer_info->is_toplevel() && outer_info->will_serialize()) { | 1284 if (outer_info->is_toplevel() && outer_info->will_serialize()) { |
1285 // Make sure that if the toplevel code (possibly to be serialized), | 1285 // Make sure that if the toplevel code (possibly to be serialized), |
1286 // the inner unction must be allowed to be compiled lazily. | 1286 // the inner function must be allowed to be compiled lazily. |
jochen (gone - plz use gerrit)
2014/10/20 13:51:14
nit. not related to this cl
Erik Corry
2014/10/20 13:56:37
Does this mean you would rather leave the spelling
| |
1287 DCHECK(allow_lazy); | 1287 DCHECK(allow_lazy); |
1288 } | 1288 } |
1289 | 1289 |
1290 // Generate code | 1290 // Generate code |
1291 Handle<ScopeInfo> scope_info; | 1291 Handle<ScopeInfo> scope_info; |
1292 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) { | 1292 if (FLAG_lazy && allow_lazy && !literal->is_parenthesized()) { |
1293 Handle<Code> code = isolate->builtins()->CompileLazy(); | 1293 Handle<Code> code = isolate->builtins()->CompileLazy(); |
1294 info.SetCode(code); | 1294 info.SetCode(code); |
1295 scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate)); | 1295 scope_info = Handle<ScopeInfo>(ScopeInfo::Empty(isolate)); |
1296 } else if (FullCodeGenerator::MakeCode(&info)) { | 1296 } else if (FullCodeGenerator::MakeCode(&info)) { |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1446 AllowHandleDereference allow_deref; | 1446 AllowHandleDereference allow_deref; |
1447 bool tracing_on = info()->IsStub() | 1447 bool tracing_on = info()->IsStub() |
1448 ? FLAG_trace_hydrogen_stubs | 1448 ? FLAG_trace_hydrogen_stubs |
1449 : (FLAG_trace_hydrogen && | 1449 : (FLAG_trace_hydrogen && |
1450 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1450 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1451 return (tracing_on && | 1451 return (tracing_on && |
1452 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1452 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1453 } | 1453 } |
1454 | 1454 |
1455 } } // namespace v8::internal | 1455 } } // namespace v8::internal |
OLD | NEW |