OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/background-parsing-task.h" | 5 #include "src/background-parsing-task.h" |
6 #include "src/debug/debug.h" | 6 #include "src/debug/debug.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 ParseInfo* info = new ParseInfo(zone); | 25 ParseInfo* info = new ParseInfo(zone); |
26 source->zone.Reset(zone); | 26 source->zone.Reset(zone); |
27 source->info.Reset(info); | 27 source->info.Reset(info); |
28 info->set_isolate(isolate); | 28 info->set_isolate(isolate); |
29 info->set_source_stream(source->source_stream.get()); | 29 info->set_source_stream(source->source_stream.get()); |
30 info->set_source_stream_encoding(source->encoding); | 30 info->set_source_stream_encoding(source->encoding); |
31 info->set_hash_seed(isolate->heap()->HashSeed()); | 31 info->set_hash_seed(isolate->heap()->HashSeed()); |
32 info->set_global(); | 32 info->set_global(); |
33 info->set_unicode_cache(&source_->unicode_cache); | 33 info->set_unicode_cache(&source_->unicode_cache); |
34 info->set_compile_options(options); | 34 info->set_compile_options(options); |
35 info->set_allow_lazy_parsing(true); | 35 // Parse eagerly with ignition since we will compile eagerly. |
| 36 info->set_allow_lazy_parsing(!(i::FLAG_ignition && i::FLAG_ignition_eager)); |
36 } | 37 } |
37 | 38 |
38 | 39 |
39 void BackgroundParsingTask::Run() { | 40 void BackgroundParsingTask::Run() { |
40 DisallowHeapAllocation no_allocation; | 41 DisallowHeapAllocation no_allocation; |
41 DisallowHandleAllocation no_handles; | 42 DisallowHandleAllocation no_handles; |
42 DisallowHandleDereference no_deref; | 43 DisallowHandleDereference no_deref; |
43 | 44 |
44 ScriptData* script_data = NULL; | 45 ScriptData* script_data = NULL; |
45 ScriptCompiler::CompileOptions options = source_->info->compile_options(); | 46 ScriptCompiler::CompileOptions options = source_->info->compile_options(); |
(...skipping 14 matching lines...) Expand all Loading... |
60 if (script_data != NULL) { | 61 if (script_data != NULL) { |
61 source_->cached_data.Reset(new ScriptCompiler::CachedData( | 62 source_->cached_data.Reset(new ScriptCompiler::CachedData( |
62 script_data->data(), script_data->length(), | 63 script_data->data(), script_data->length(), |
63 ScriptCompiler::CachedData::BufferOwned)); | 64 ScriptCompiler::CachedData::BufferOwned)); |
64 script_data->ReleaseDataOwnership(); | 65 script_data->ReleaseDataOwnership(); |
65 delete script_data; | 66 delete script_data; |
66 } | 67 } |
67 } | 68 } |
68 } // namespace internal | 69 } // namespace internal |
69 } // namespace v8 | 70 } // namespace v8 |
OLD | NEW |