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/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/ast-expression-rewriter.h" | 9 #include "src/ast/ast-expression-rewriter.h" |
10 #include "src/ast/ast-expression-visitor.h" | 10 #include "src/ast/ast-expression-visitor.h" |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 cached_parse_data_(NULL), | 777 cached_parse_data_(NULL), |
778 total_preparse_skipped_(0), | 778 total_preparse_skipped_(0), |
779 pre_parse_timer_(NULL), | 779 pre_parse_timer_(NULL), |
780 parsing_on_main_thread_(true) { | 780 parsing_on_main_thread_(true) { |
781 // Even though we were passed ParseInfo, we should not store it in | 781 // Even though we were passed ParseInfo, we should not store it in |
782 // Parser - this makes sure that Isolate is not accidentally accessed via | 782 // Parser - this makes sure that Isolate is not accidentally accessed via |
783 // ParseInfo during background parsing. | 783 // ParseInfo during background parsing. |
784 DCHECK(!info->script().is_null() || info->source_stream() != NULL); | 784 DCHECK(!info->script().is_null() || info->source_stream() != NULL); |
785 set_allow_lazy(info->allow_lazy_parsing()); | 785 set_allow_lazy(info->allow_lazy_parsing()); |
786 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); | 786 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); |
787 set_allow_tailcalls(FLAG_harmony_tailcalls && !info->is_native()); | 787 set_allow_tailcalls(FLAG_harmony_tailcalls && !info->is_native() && |
| 788 info->isolate()->is_tail_call_elimination_enabled()); |
788 set_allow_harmony_sloppy(FLAG_harmony_sloppy); | 789 set_allow_harmony_sloppy(FLAG_harmony_sloppy); |
789 set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function); | 790 set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function); |
790 set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); | 791 set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); |
791 set_allow_harmony_do_expressions(FLAG_harmony_do_expressions); | 792 set_allow_harmony_do_expressions(FLAG_harmony_do_expressions); |
792 set_allow_harmony_function_name(FLAG_harmony_function_name); | 793 set_allow_harmony_function_name(FLAG_harmony_function_name); |
793 set_allow_harmony_function_sent(FLAG_harmony_function_sent); | 794 set_allow_harmony_function_sent(FLAG_harmony_function_sent); |
794 set_allow_harmony_restrictive_declarations( | 795 set_allow_harmony_restrictive_declarations( |
795 FLAG_harmony_restrictive_declarations); | 796 FLAG_harmony_restrictive_declarations); |
796 set_allow_harmony_exponentiation_operator( | 797 set_allow_harmony_exponentiation_operator( |
797 FLAG_harmony_exponentiation_operator); | 798 FLAG_harmony_exponentiation_operator); |
(...skipping 6061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6859 try_block, target); | 6860 try_block, target); |
6860 final_loop = target; | 6861 final_loop = target; |
6861 } | 6862 } |
6862 | 6863 |
6863 return final_loop; | 6864 return final_loop; |
6864 } | 6865 } |
6865 | 6866 |
6866 | 6867 |
6867 } // namespace internal | 6868 } // namespace internal |
6868 } // namespace v8 | 6869 } // namespace v8 |
OLD | NEW |