| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 isolate->debugger()->OnBeforeCompile(script); | 782 isolate->debugger()->OnBeforeCompile(script); |
| 783 #endif | 783 #endif |
| 784 | 784 |
| 785 ASSERT(info->is_eval() || info->is_global()); | 785 ASSERT(info->is_eval() || info->is_global()); |
| 786 | 786 |
| 787 bool parse_allow_lazy = | 787 bool parse_allow_lazy = |
| 788 (info->pre_parse_data() != NULL || | 788 (info->pre_parse_data() != NULL || |
| 789 String::cast(script->source())->length() > FLAG_min_preparse_length) && | 789 String::cast(script->source())->length() > FLAG_min_preparse_length) && |
| 790 !DebuggerWantsEagerCompilation(info); | 790 !DebuggerWantsEagerCompilation(info); |
| 791 | 791 |
| 792 if (!parse_allow_lazy && info->pre_parse_data() != NULL) { |
| 793 // We are going to parse eagerly, but we have preparse data produced by lazy |
| 794 // preparsing. We cannot use it, since it won't contain all the symbols we |
| 795 // need for eager parsing. |
| 796 info->SetPreParseData(NULL); |
| 797 } |
| 798 |
| 792 Handle<SharedFunctionInfo> result; | 799 Handle<SharedFunctionInfo> result; |
| 793 | 800 |
| 794 { VMState<COMPILER> state(info->isolate()); | 801 { VMState<COMPILER> state(info->isolate()); |
| 795 if (!Parser::Parse(info, parse_allow_lazy)) { | 802 if (!Parser::Parse(info, parse_allow_lazy)) { |
| 796 return Handle<SharedFunctionInfo>::null(); | 803 return Handle<SharedFunctionInfo>::null(); |
| 797 } | 804 } |
| 798 | 805 |
| 799 FunctionLiteral* lit = info->function(); | 806 FunctionLiteral* lit = info->function(); |
| 800 LiveEditFunctionTracker live_edit_tracker(isolate, lit); | 807 LiveEditFunctionTracker live_edit_tracker(isolate, lit); |
| 801 | 808 |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 AllowHandleDereference allow_deref; | 1308 AllowHandleDereference allow_deref; |
| 1302 bool tracing_on = info()->IsStub() | 1309 bool tracing_on = info()->IsStub() |
| 1303 ? FLAG_trace_hydrogen_stubs | 1310 ? FLAG_trace_hydrogen_stubs |
| 1304 : (FLAG_trace_hydrogen && | 1311 : (FLAG_trace_hydrogen && |
| 1305 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1312 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
| 1306 return (tracing_on && | 1313 return (tracing_on && |
| 1307 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1314 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
| 1308 } | 1315 } |
| 1309 | 1316 |
| 1310 } } // namespace v8::internal | 1317 } } // namespace v8::internal |
| OLD | NEW |