OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 13783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13794 // code as non-optimizable. The marker on the shared function info | 13794 // code as non-optimizable. The marker on the shared function info |
13795 // is there because we flush non-optimized code thereby loosing the | 13795 // is there because we flush non-optimized code thereby loosing the |
13796 // non-optimizable information for the code. When the code is | 13796 // non-optimizable information for the code. When the code is |
13797 // regenerated and set on the shared function info it is marked as | 13797 // regenerated and set on the shared function info it is marked as |
13798 // non-optimizable if optimization is disabled for the shared | 13798 // non-optimizable if optimization is disabled for the shared |
13799 // function info. | 13799 // function info. |
13800 DCHECK(reason != kNoReason); | 13800 DCHECK(reason != kNoReason); |
13801 set_optimization_disabled(true); | 13801 set_optimization_disabled(true); |
13802 set_disable_optimization_reason(reason); | 13802 set_disable_optimization_reason(reason); |
13803 // Code should be the lazy compilation stub or else unoptimized. | 13803 // Code should be the lazy compilation stub or else unoptimized. |
13804 DCHECK(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN); | 13804 DCHECK(abstract_code()->kind() == AbstractCode::FUNCTION || |
13805 PROFILE(GetIsolate(), CodeDisableOptEvent(code(), this)); | 13805 abstract_code()->kind() == AbstractCode::INTERPRETED_FUNCTION || |
| 13806 abstract_code()->kind() == AbstractCode::BUILTIN); |
| 13807 PROFILE(GetIsolate(), CodeDisableOptEvent(abstract_code(), this)); |
13806 if (FLAG_trace_opt) { | 13808 if (FLAG_trace_opt) { |
13807 PrintF("[disabled optimization for "); | 13809 PrintF("[disabled optimization for "); |
13808 ShortPrint(); | 13810 ShortPrint(); |
13809 PrintF(", reason: %s]\n", GetBailoutReason(reason)); | 13811 PrintF(", reason: %s]\n", GetBailoutReason(reason)); |
13810 } | 13812 } |
13811 } | 13813 } |
13812 | 13814 |
13813 | 13815 |
13814 void SharedFunctionInfo::InitFromFunctionLiteral( | 13816 void SharedFunctionInfo::InitFromFunctionLiteral( |
13815 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { | 13817 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
(...skipping 6039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19855 if (cell->value() != *new_value) { | 19857 if (cell->value() != *new_value) { |
19856 cell->set_value(*new_value); | 19858 cell->set_value(*new_value); |
19857 Isolate* isolate = cell->GetIsolate(); | 19859 Isolate* isolate = cell->GetIsolate(); |
19858 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19860 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19859 isolate, DependentCode::kPropertyCellChangedGroup); | 19861 isolate, DependentCode::kPropertyCellChangedGroup); |
19860 } | 19862 } |
19861 } | 19863 } |
19862 | 19864 |
19863 } // namespace internal | 19865 } // namespace internal |
19864 } // namespace v8 | 19866 } // namespace v8 |
OLD | NEW |