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 10598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10609 PrintF("[disabled optimization for "); | 10609 PrintF("[disabled optimization for "); |
10610 ShortPrint(); | 10610 ShortPrint(); |
10611 PrintF(", reason: %s]\n", GetBailoutReason(reason)); | 10611 PrintF(", reason: %s]\n", GetBailoutReason(reason)); |
10612 } | 10612 } |
10613 } | 10613 } |
10614 | 10614 |
10615 | 10615 |
10616 void SharedFunctionInfo::InitFromFunctionLiteral( | 10616 void SharedFunctionInfo::InitFromFunctionLiteral( |
10617 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { | 10617 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
10618 shared_info->set_length(lit->scope()->default_function_length()); | 10618 shared_info->set_length(lit->scope()->default_function_length()); |
10619 if (IsSubclassConstructor(lit->kind())) { | 10619 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); |
10620 shared_info->set_internal_formal_parameter_count(lit->parameter_count() + | |
10621 1); | |
10622 } else { | |
10623 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); | |
10624 } | |
10625 shared_info->set_function_token_position(lit->function_token_position()); | 10620 shared_info->set_function_token_position(lit->function_token_position()); |
10626 shared_info->set_start_position(lit->start_position()); | 10621 shared_info->set_start_position(lit->start_position()); |
10627 shared_info->set_end_position(lit->end_position()); | 10622 shared_info->set_end_position(lit->end_position()); |
10628 shared_info->set_is_expression(lit->is_expression()); | 10623 shared_info->set_is_expression(lit->is_expression()); |
10629 shared_info->set_is_anonymous(lit->is_anonymous()); | 10624 shared_info->set_is_anonymous(lit->is_anonymous()); |
10630 shared_info->set_inferred_name(*lit->inferred_name()); | 10625 shared_info->set_inferred_name(*lit->inferred_name()); |
10631 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); | 10626 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); |
10632 shared_info->set_allows_lazy_compilation_without_context( | 10627 shared_info->set_allows_lazy_compilation_without_context( |
10633 lit->AllowsLazyCompilationWithoutContext()); | 10628 lit->AllowsLazyCompilationWithoutContext()); |
10634 shared_info->set_language_mode(lit->language_mode()); | 10629 shared_info->set_language_mode(lit->language_mode()); |
(...skipping 6007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16642 Handle<Object> new_value) { | 16637 Handle<Object> new_value) { |
16643 if (cell->value() != *new_value) { | 16638 if (cell->value() != *new_value) { |
16644 cell->set_value(*new_value); | 16639 cell->set_value(*new_value); |
16645 Isolate* isolate = cell->GetIsolate(); | 16640 Isolate* isolate = cell->GetIsolate(); |
16646 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16641 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
16647 isolate, DependentCode::kPropertyCellChangedGroup); | 16642 isolate, DependentCode::kPropertyCellChangedGroup); |
16648 } | 16643 } |
16649 } | 16644 } |
16650 } // namespace internal | 16645 } // namespace internal |
16651 } // namespace v8 | 16646 } // namespace v8 |
OLD | NEW |