| 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/debug/liveedit.h" | 5 #include "src/debug/liveedit.h" |
| 6 | 6 |
| 7 #include "src/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 // Marks code that shares the same shared function info or has inlined | 832 // Marks code that shares the same shared function info or has inlined |
| 833 // code that shares the same function info. | 833 // code that shares the same function info. |
| 834 class DependentFunctionMarker: public OptimizedFunctionVisitor { | 834 class DependentFunctionMarker: public OptimizedFunctionVisitor { |
| 835 public: | 835 public: |
| 836 SharedFunctionInfo* shared_info_; | 836 SharedFunctionInfo* shared_info_; |
| 837 bool found_; | 837 bool found_; |
| 838 | 838 |
| 839 explicit DependentFunctionMarker(SharedFunctionInfo* shared_info) | 839 explicit DependentFunctionMarker(SharedFunctionInfo* shared_info) |
| 840 : shared_info_(shared_info), found_(false) { } | 840 : shared_info_(shared_info), found_(false) { } |
| 841 | 841 |
| 842 virtual void EnterContext(Context* context) { } // Don't care. | |
| 843 virtual void LeaveContext(Context* context) { } // Don't care. | |
| 844 virtual void VisitFunction(JSFunction* function) { | 842 virtual void VisitFunction(JSFunction* function) { |
| 845 // It should be guaranteed by the iterator that everything is optimized. | 843 // It should be guaranteed by the iterator that everything is optimized. |
| 846 DCHECK(function->code()->kind() == Code::OPTIMIZED_FUNCTION); | 844 DCHECK(function->code()->kind() == Code::OPTIMIZED_FUNCTION); |
| 847 if (function->Inlines(shared_info_)) { | 845 if (function->Inlines(shared_info_)) { |
| 848 // Mark the code for deoptimization. | 846 // Mark the code for deoptimization. |
| 849 function->code()->set_marked_for_deoptimization(true); | 847 function->code()->set_marked_for_deoptimization(true); |
| 850 found_ = true; | 848 found_ = true; |
| 851 } | 849 } |
| 852 } | 850 } |
| 853 }; | 851 }; |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 scope_info_length++; | 1644 scope_info_length++; |
| 1647 | 1645 |
| 1648 current_scope = current_scope->outer_scope(); | 1646 current_scope = current_scope->outer_scope(); |
| 1649 } | 1647 } |
| 1650 | 1648 |
| 1651 return scope_info_list; | 1649 return scope_info_list; |
| 1652 } | 1650 } |
| 1653 | 1651 |
| 1654 } // namespace internal | 1652 } // namespace internal |
| 1655 } // namespace v8 | 1653 } // namespace v8 |
| OLD | NEW |