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/api.h" | 7 #include "src/api.h" |
8 #include "src/ast.h" | 8 #include "src/ast.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 set_allow_lazy(false); // Must be explicitly enabled. | 798 set_allow_lazy(false); // Must be explicitly enabled. |
799 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); | 799 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); |
800 set_allow_harmony_scoping(!info->is_native() && FLAG_harmony_scoping); | 800 set_allow_harmony_scoping(!info->is_native() && FLAG_harmony_scoping); |
801 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules); | 801 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules); |
802 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); | 802 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); |
803 set_allow_harmony_numeric_literals(FLAG_harmony_numeric_literals); | 803 set_allow_harmony_numeric_literals(FLAG_harmony_numeric_literals); |
804 set_allow_harmony_classes(FLAG_harmony_classes); | 804 set_allow_harmony_classes(FLAG_harmony_classes); |
805 set_allow_harmony_object_literals(FLAG_harmony_object_literals); | 805 set_allow_harmony_object_literals(FLAG_harmony_object_literals); |
806 set_allow_harmony_templates(FLAG_harmony_templates); | 806 set_allow_harmony_templates(FLAG_harmony_templates); |
807 set_allow_harmony_sloppy(FLAG_harmony_sloppy); | 807 set_allow_harmony_sloppy(FLAG_harmony_sloppy); |
| 808 set_allow_harmony_unicode(FLAG_harmony_unicode); |
808 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; | 809 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; |
809 ++feature) { | 810 ++feature) { |
810 use_counts_[feature] = 0; | 811 use_counts_[feature] = 0; |
811 } | 812 } |
812 if (info->ast_value_factory() == NULL) { | 813 if (info->ast_value_factory() == NULL) { |
813 // info takes ownership of AstValueFactory. | 814 // info takes ownership of AstValueFactory. |
814 info->SetAstValueFactory( | 815 info->SetAstValueFactory( |
815 new AstValueFactory(zone(), parse_info->hash_seed)); | 816 new AstValueFactory(zone(), parse_info->hash_seed)); |
816 } | 817 } |
817 } | 818 } |
(...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3975 reusable_preparser_->set_allow_harmony_modules(allow_harmony_modules()); | 3976 reusable_preparser_->set_allow_harmony_modules(allow_harmony_modules()); |
3976 reusable_preparser_->set_allow_harmony_arrow_functions( | 3977 reusable_preparser_->set_allow_harmony_arrow_functions( |
3977 allow_harmony_arrow_functions()); | 3978 allow_harmony_arrow_functions()); |
3978 reusable_preparser_->set_allow_harmony_numeric_literals( | 3979 reusable_preparser_->set_allow_harmony_numeric_literals( |
3979 allow_harmony_numeric_literals()); | 3980 allow_harmony_numeric_literals()); |
3980 reusable_preparser_->set_allow_harmony_classes(allow_harmony_classes()); | 3981 reusable_preparser_->set_allow_harmony_classes(allow_harmony_classes()); |
3981 reusable_preparser_->set_allow_harmony_object_literals( | 3982 reusable_preparser_->set_allow_harmony_object_literals( |
3982 allow_harmony_object_literals()); | 3983 allow_harmony_object_literals()); |
3983 reusable_preparser_->set_allow_harmony_templates(allow_harmony_templates()); | 3984 reusable_preparser_->set_allow_harmony_templates(allow_harmony_templates()); |
3984 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy()); | 3985 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy()); |
| 3986 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode()); |
3985 } | 3987 } |
3986 PreParser::PreParseResult result = | 3988 PreParser::PreParseResult result = |
3987 reusable_preparser_->PreParseLazyFunction(strict_mode(), | 3989 reusable_preparser_->PreParseLazyFunction(strict_mode(), |
3988 is_generator(), | 3990 is_generator(), |
3989 logger); | 3991 logger); |
3990 if (pre_parse_timer_ != NULL) { | 3992 if (pre_parse_timer_ != NULL) { |
3991 pre_parse_timer_->Stop(); | 3993 pre_parse_timer_->Stop(); |
3992 } | 3994 } |
3993 return result; | 3995 return result; |
3994 } | 3996 } |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5348 } | 5350 } |
5349 | 5351 |
5350 // Hash key is used exclusively by template call site caching. There are no | 5352 // Hash key is used exclusively by template call site caching. There are no |
5351 // real security implications for unseeded hashes, and no issues with changing | 5353 // real security implications for unseeded hashes, and no issues with changing |
5352 // the hashing algorithm to improve performance or entropy. | 5354 // the hashing algorithm to improve performance or entropy. |
5353 *hash = running_hash; | 5355 *hash = running_hash; |
5354 | 5356 |
5355 return raw_strings; | 5357 return raw_strings; |
5356 } | 5358 } |
5357 } } // namespace v8::internal | 5359 } } // namespace v8::internal |
OLD | NEW |