| 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 10517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10528 PrintF("[disabled optimization for "); | 10528 PrintF("[disabled optimization for "); |
| 10529 ShortPrint(); | 10529 ShortPrint(); |
| 10530 PrintF(", reason: %s]\n", GetBailoutReason(reason)); | 10530 PrintF(", reason: %s]\n", GetBailoutReason(reason)); |
| 10531 } | 10531 } |
| 10532 } | 10532 } |
| 10533 | 10533 |
| 10534 | 10534 |
| 10535 void SharedFunctionInfo::InitFromFunctionLiteral( | 10535 void SharedFunctionInfo::InitFromFunctionLiteral( |
| 10536 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { | 10536 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
| 10537 shared_info->set_length(lit->scope()->default_function_length()); | 10537 shared_info->set_length(lit->scope()->default_function_length()); |
| 10538 if (IsSubclassConstructor(lit->kind())) { | 10538 if (IsSubclassConstructor(lit->kind()) || |
| 10539 lit->scope()->new_target_var() != nullptr) { |
| 10539 shared_info->set_internal_formal_parameter_count(lit->parameter_count() + | 10540 shared_info->set_internal_formal_parameter_count(lit->parameter_count() + |
| 10540 1); | 10541 1); |
| 10541 } else { | 10542 } else { |
| 10542 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); | 10543 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); |
| 10543 } | 10544 } |
| 10544 shared_info->set_function_token_position(lit->function_token_position()); | 10545 shared_info->set_function_token_position(lit->function_token_position()); |
| 10545 shared_info->set_start_position(lit->start_position()); | 10546 shared_info->set_start_position(lit->start_position()); |
| 10546 shared_info->set_end_position(lit->end_position()); | 10547 shared_info->set_end_position(lit->end_position()); |
| 10547 shared_info->set_is_expression(lit->is_expression()); | 10548 shared_info->set_is_expression(lit->is_expression()); |
| 10548 shared_info->set_is_anonymous(lit->is_anonymous()); | 10549 shared_info->set_is_anonymous(lit->is_anonymous()); |
| (...skipping 6076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16625 Handle<Object> new_value) { | 16626 Handle<Object> new_value) { |
| 16626 if (cell->value() != *new_value) { | 16627 if (cell->value() != *new_value) { |
| 16627 cell->set_value(*new_value); | 16628 cell->set_value(*new_value); |
| 16628 Isolate* isolate = cell->GetIsolate(); | 16629 Isolate* isolate = cell->GetIsolate(); |
| 16629 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16630 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 16630 isolate, DependentCode::kPropertyCellChangedGroup); | 16631 isolate, DependentCode::kPropertyCellChangedGroup); |
| 16631 } | 16632 } |
| 16632 } | 16633 } |
| 16633 } // namespace internal | 16634 } // namespace internal |
| 16634 } // namespace v8 | 16635 } // namespace v8 |
| OLD | NEW |