| 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 isolate->bootstrapper()->NativesSourceLookup(index); | 779 isolate->bootstrapper()->NativesSourceLookup(index); |
| 780 Vector<const char> name = Natives::GetScriptName(index); | 780 Vector<const char> name = Natives::GetScriptName(index); |
| 781 Handle<String> script_name = factory->NewStringFromAscii(name); | 781 Handle<String> script_name = factory->NewStringFromAscii(name); |
| 782 Handle<Context> context = isolate->native_context(); | 782 Handle<Context> context = isolate->native_context(); |
| 783 | 783 |
| 784 // Compile the script. | 784 // Compile the script. |
| 785 Handle<SharedFunctionInfo> function_info; | 785 Handle<SharedFunctionInfo> function_info; |
| 786 function_info = Compiler::Compile(source_code, | 786 function_info = Compiler::Compile(source_code, |
| 787 script_name, | 787 script_name, |
| 788 0, 0, | 788 0, 0, |
| 789 false, |
| 789 context, | 790 context, |
| 790 NULL, NULL, | 791 NULL, NULL, |
| 791 Handle<String>::null(), | 792 Handle<String>::null(), |
| 792 NATIVES_CODE); | 793 NATIVES_CODE); |
| 793 | 794 |
| 794 // Silently ignore stack overflows during compilation. | 795 // Silently ignore stack overflows during compilation. |
| 795 if (function_info.is_null()) { | 796 if (function_info.is_null()) { |
| 796 ASSERT(isolate->has_pending_exception()); | 797 ASSERT(isolate->has_pending_exception()); |
| 797 isolate->clear_pending_exception(); | 798 isolate->clear_pending_exception(); |
| 798 return false; | 799 return false; |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2037 void VisitThread(Isolate* isolate, ThreadLocalTop* top) { | 2038 void VisitThread(Isolate* isolate, ThreadLocalTop* top) { |
| 2038 RedirectActivationsToRecompiledCodeOnThread(isolate, top); | 2039 RedirectActivationsToRecompiledCodeOnThread(isolate, top); |
| 2039 } | 2040 } |
| 2040 }; | 2041 }; |
| 2041 | 2042 |
| 2042 | 2043 |
| 2043 void Debug::PrepareForBreakPoints() { | 2044 void Debug::PrepareForBreakPoints() { |
| 2044 // If preparing for the first break point make sure to deoptimize all | 2045 // If preparing for the first break point make sure to deoptimize all |
| 2045 // functions as debugging does not work with optimized code. | 2046 // functions as debugging does not work with optimized code. |
| 2046 if (!has_break_points_) { | 2047 if (!has_break_points_) { |
| 2047 if (FLAG_parallel_recompilation) { | |
| 2048 isolate_->optimizing_compiler_thread()->Flush(); | |
| 2049 } | |
| 2050 | |
| 2051 Deoptimizer::DeoptimizeAll(isolate_); | 2048 Deoptimizer::DeoptimizeAll(isolate_); |
| 2052 | 2049 |
| 2053 Handle<Code> lazy_compile = | 2050 Handle<Code> lazy_compile = |
| 2054 Handle<Code>(isolate_->builtins()->builtin(Builtins::kLazyCompile)); | 2051 Handle<Code>(isolate_->builtins()->builtin(Builtins::kLazyCompile)); |
| 2055 | 2052 |
| 2056 // There will be at least one break point when we are done. | 2053 // There will be at least one break point when we are done. |
| 2057 has_break_points_ = true; | 2054 has_break_points_ = true; |
| 2058 | 2055 |
| 2059 // Keep the list of activated functions in a handlified list as it | 2056 // Keep the list of activated functions in a handlified list as it |
| 2060 // is used both in GC and non-GC code. | 2057 // is used both in GC and non-GC code. |
| (...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3862 { | 3859 { |
| 3863 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3860 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
| 3864 isolate_->debugger()->CallMessageDispatchHandler(); | 3861 isolate_->debugger()->CallMessageDispatchHandler(); |
| 3865 } | 3862 } |
| 3866 } | 3863 } |
| 3867 } | 3864 } |
| 3868 | 3865 |
| 3869 #endif // ENABLE_DEBUGGER_SUPPORT | 3866 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3870 | 3867 |
| 3871 } } // namespace v8::internal | 3868 } } // namespace v8::internal |
| OLD | NEW |