| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <iomanip> | 5 #include <iomanip> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 10547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10558 PrintF("[disabled optimization for "); | 10558 PrintF("[disabled optimization for "); |
| 10559 ShortPrint(); | 10559 ShortPrint(); |
| 10560 PrintF(", reason: %s]\n", GetBailoutReason(reason)); | 10560 PrintF(", reason: %s]\n", GetBailoutReason(reason)); |
| 10561 } | 10561 } |
| 10562 } | 10562 } |
| 10563 | 10563 |
| 10564 | 10564 |
| 10565 void SharedFunctionInfo::InitFromFunctionLiteral( | 10565 void SharedFunctionInfo::InitFromFunctionLiteral( |
| 10566 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { | 10566 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
| 10567 shared_info->set_length(lit->scope()->default_function_length()); | 10567 shared_info->set_length(lit->scope()->default_function_length()); |
| 10568 if (IsSubclassConstructor(lit->kind())) { | 10568 if (IsSubclassConstructor(lit->kind()) || |
| 10569 lit->scope()->new_target_var() != nullptr) { |
| 10569 shared_info->set_internal_formal_parameter_count(lit->parameter_count() + | 10570 shared_info->set_internal_formal_parameter_count(lit->parameter_count() + |
| 10570 1); | 10571 1); |
| 10571 } else { | 10572 } else { |
| 10572 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); | 10573 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); |
| 10573 } | 10574 } |
| 10574 shared_info->set_function_token_position(lit->function_token_position()); | 10575 shared_info->set_function_token_position(lit->function_token_position()); |
| 10575 shared_info->set_start_position(lit->start_position()); | 10576 shared_info->set_start_position(lit->start_position()); |
| 10576 shared_info->set_end_position(lit->end_position()); | 10577 shared_info->set_end_position(lit->end_position()); |
| 10577 shared_info->set_is_expression(lit->is_expression()); | 10578 shared_info->set_is_expression(lit->is_expression()); |
| 10578 shared_info->set_is_anonymous(lit->is_anonymous()); | 10579 shared_info->set_is_anonymous(lit->is_anonymous()); |
| (...skipping 6083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16662 Handle<Object> new_value) { | 16663 Handle<Object> new_value) { |
| 16663 if (cell->value() != *new_value) { | 16664 if (cell->value() != *new_value) { |
| 16664 cell->set_value(*new_value); | 16665 cell->set_value(*new_value); |
| 16665 Isolate* isolate = cell->GetIsolate(); | 16666 Isolate* isolate = cell->GetIsolate(); |
| 16666 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16667 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 16667 isolate, DependentCode::kPropertyCellChangedGroup); | 16668 isolate, DependentCode::kPropertyCellChangedGroup); |
| 16668 } | 16669 } |
| 16669 } | 16670 } |
| 16670 } // namespace internal | 16671 } // namespace internal |
| 16671 } // namespace v8 | 16672 } // namespace v8 |
| OLD | NEW |