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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2099 // function and mark them for lazy compilation. | 2099 // function and mark them for lazy compilation. |
2100 HeapIterator iterator(heap); | 2100 HeapIterator iterator(heap); |
2101 HeapObject* obj = NULL; | 2101 HeapObject* obj = NULL; |
2102 while (((obj = iterator.next()) != NULL)) { | 2102 while (((obj = iterator.next()) != NULL)) { |
2103 if (obj->IsJSFunction()) { | 2103 if (obj->IsJSFunction()) { |
2104 JSFunction* function = JSFunction::cast(obj); | 2104 JSFunction* function = JSFunction::cast(obj); |
2105 SharedFunctionInfo* shared = function->shared(); | 2105 SharedFunctionInfo* shared = function->shared(); |
2106 | 2106 |
2107 if (!shared->allows_lazy_compilation()) continue; | 2107 if (!shared->allows_lazy_compilation()) continue; |
2108 if (!shared->script()->IsScript()) continue; | 2108 if (!shared->script()->IsScript()) continue; |
| 2109 if (function->IsBuiltin()) continue; |
2109 if (shared->code()->gc_metadata() == active_code_marker) continue; | 2110 if (shared->code()->gc_metadata() == active_code_marker) continue; |
2110 | 2111 |
2111 Code::Kind kind = function->code()->kind(); | 2112 Code::Kind kind = function->code()->kind(); |
2112 if (kind == Code::FUNCTION && | 2113 if (kind == Code::FUNCTION && |
2113 !function->code()->has_debug_break_slots()) { | 2114 !function->code()->has_debug_break_slots()) { |
2114 function->set_code(*lazy_compile); | 2115 function->set_code(*lazy_compile); |
2115 function->shared()->set_code(*lazy_compile); | 2116 function->shared()->set_code(*lazy_compile); |
2116 } else if (kind == Code::BUILTIN && | 2117 } else if (kind == Code::BUILTIN && |
2117 (function->IsInRecompileQueue() || | 2118 (function->IsInRecompileQueue() || |
2118 function->IsMarkedForLazyRecompilation() || | 2119 function->IsMarkedForLazyRecompilation() || |
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3851 { | 3852 { |
3852 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3853 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3853 isolate_->debugger()->CallMessageDispatchHandler(); | 3854 isolate_->debugger()->CallMessageDispatchHandler(); |
3854 } | 3855 } |
3855 } | 3856 } |
3856 } | 3857 } |
3857 | 3858 |
3858 #endif // ENABLE_DEBUGGER_SUPPORT | 3859 #endif // ENABLE_DEBUGGER_SUPPORT |
3859 | 3860 |
3860 } } // namespace v8::internal | 3861 } } // namespace v8::internal |
OLD | NEW |