OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 } | 595 } |
596 | 596 |
597 | 597 |
598 static void CompileScriptForTracker(Isolate* isolate, Handle<Script> script) { | 598 static void CompileScriptForTracker(Isolate* isolate, Handle<Script> script) { |
599 // TODO(635): support extensions. | 599 // TODO(635): support extensions. |
600 PostponeInterruptsScope postpone(isolate); | 600 PostponeInterruptsScope postpone(isolate); |
601 | 601 |
602 // Build AST. | 602 // Build AST. |
603 CompilationInfo info(script); | 603 CompilationInfo info(script); |
604 info.MarkAsGlobal(); | 604 info.MarkAsGlobal(); |
605 if (ParserApi::Parse(&info)) { | 605 // Parse and don't allow skipping lazy functions. |
| 606 if (ParserApi::Parse(&info, kNoParsingFlags)) { |
606 // Compile the code. | 607 // Compile the code. |
607 LiveEditFunctionTracker tracker(info.isolate(), info.function()); | 608 LiveEditFunctionTracker tracker(info.isolate(), info.function()); |
608 if (Compiler::MakeCodeForLiveEdit(&info)) { | 609 if (Compiler::MakeCodeForLiveEdit(&info)) { |
609 ASSERT(!info.code().is_null()); | 610 ASSERT(!info.code().is_null()); |
610 tracker.RecordRootFunctionInfo(info.code()); | 611 tracker.RecordRootFunctionInfo(info.code()); |
611 } else { | 612 } else { |
612 info.isolate()->StackOverflow(); | 613 info.isolate()->StackOverflow(); |
613 } | 614 } |
614 } | 615 } |
615 } | 616 } |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1764 | 1765 |
1765 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 1766 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
1766 return false; | 1767 return false; |
1767 } | 1768 } |
1768 | 1769 |
1769 #endif // ENABLE_DEBUGGER_SUPPORT | 1770 #endif // ENABLE_DEBUGGER_SUPPORT |
1770 | 1771 |
1771 | 1772 |
1772 | 1773 |
1773 } } // namespace v8::internal | 1774 } } // namespace v8::internal |
OLD | NEW |