OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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-dispatcher/compiler-dispatcher-job.h" | 5 #include "src/compiler-dispatcher/compiler-dispatcher-job.h" |
6 | 6 |
7 #include "src/assert-scope.h" | 7 #include "src/assert-scope.h" |
8 #include "src/compilation-info.h" | 8 #include "src/compilation-info.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/global-handles.h" | 10 #include "src/global-handles.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 source = String::Flatten(source); | 59 source = String::Flatten(source); |
60 // Have to globalize the reference here, so it survives between function | 60 // Have to globalize the reference here, so it survives between function |
61 // calls. | 61 // calls. |
62 source_ = Handle<String>::cast(isolate_->global_handles()->Create(*source)); | 62 source_ = Handle<String>::cast(isolate_->global_handles()->Create(*source)); |
63 character_stream_.reset(ScannerStream::For( | 63 character_stream_.reset(ScannerStream::For( |
64 source_, shared_->start_position(), shared_->end_position())); | 64 source_, shared_->start_position(), shared_->end_position())); |
65 } | 65 } |
66 parse_info_.reset(new ParseInfo(zone_.get())); | 66 parse_info_.reset(new ParseInfo(zone_.get())); |
67 parse_info_->set_isolate(isolate_); | 67 parse_info_->set_isolate(isolate_); |
68 parse_info_->set_character_stream(character_stream_.get()); | 68 parse_info_->set_character_stream(character_stream_.get()); |
69 parse_info_->set_lazy(); | |
70 parse_info_->set_hash_seed(isolate_->heap()->HashSeed()); | 69 parse_info_->set_hash_seed(isolate_->heap()->HashSeed()); |
71 parse_info_->set_is_named_expression(shared_->is_named_expression()); | 70 parse_info_->set_is_named_expression(shared_->is_named_expression()); |
72 parse_info_->set_compiler_hints(shared_->compiler_hints()); | 71 parse_info_->set_compiler_hints(shared_->compiler_hints()); |
73 parse_info_->set_start_position(shared_->start_position()); | 72 parse_info_->set_start_position(shared_->start_position()); |
74 parse_info_->set_end_position(shared_->end_position()); | 73 parse_info_->set_end_position(shared_->end_position()); |
75 parse_info_->set_unicode_cache(unicode_cache_.get()); | 74 parse_info_->set_unicode_cache(unicode_cache_.get()); |
76 parse_info_->set_language_mode(shared_->language_mode()); | 75 parse_info_->set_language_mode(shared_->language_mode()); |
77 | 76 |
78 parser_.reset(new Parser(parse_info_.get())); | 77 parser_.reset(new Parser(parse_info_.get())); |
79 Handle<ScopeInfo> outer_scope_info( | 78 Handle<ScopeInfo> outer_scope_info( |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 if (!source_.is_null()) { | 248 if (!source_.is_null()) { |
250 i::GlobalHandles::Destroy(Handle<Object>::cast(source_).location()); | 249 i::GlobalHandles::Destroy(Handle<Object>::cast(source_).location()); |
251 source_ = Handle<String>::null(); | 250 source_ = Handle<String>::null(); |
252 } | 251 } |
253 | 252 |
254 status_ = CompileJobStatus::kInitial; | 253 status_ = CompileJobStatus::kInitial; |
255 } | 254 } |
256 | 255 |
257 } // namespace internal | 256 } // namespace internal |
258 } // namespace v8 | 257 } // namespace v8 |
OLD | NEW |