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 <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 13710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13721 | 13721 |
13722 shared->set_expected_nof_properties(estimate); | 13722 shared->set_expected_nof_properties(estimate); |
13723 } | 13723 } |
13724 | 13724 |
13725 } // namespace | 13725 } // namespace |
13726 | 13726 |
13727 void SharedFunctionInfo::InitFromFunctionLiteral( | 13727 void SharedFunctionInfo::InitFromFunctionLiteral( |
13728 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { | 13728 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
13729 // When adding fields here, make sure DeclarationScope::AnalyzePartially is | 13729 // When adding fields here, make sure DeclarationScope::AnalyzePartially is |
13730 // updated accordingly. | 13730 // updated accordingly. |
13731 shared_info->set_length(lit->scope()->arity()); | 13731 shared_info->set_length(lit->function_length()); |
13732 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); | 13732 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); |
13733 shared_info->set_function_token_position(lit->function_token_position()); | 13733 shared_info->set_function_token_position(lit->function_token_position()); |
13734 shared_info->set_start_position(lit->start_position()); | 13734 shared_info->set_start_position(lit->start_position()); |
13735 shared_info->set_end_position(lit->end_position()); | 13735 shared_info->set_end_position(lit->end_position()); |
13736 shared_info->set_is_declaration(lit->is_declaration()); | 13736 shared_info->set_is_declaration(lit->is_declaration()); |
13737 shared_info->set_is_named_expression(lit->is_named_expression()); | 13737 shared_info->set_is_named_expression(lit->is_named_expression()); |
13738 shared_info->set_is_anonymous_expression(lit->is_anonymous_expression()); | 13738 shared_info->set_is_anonymous_expression(lit->is_anonymous_expression()); |
13739 shared_info->set_inferred_name(*lit->inferred_name()); | 13739 shared_info->set_inferred_name(*lit->inferred_name()); |
13740 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); | 13740 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); |
13741 shared_info->set_language_mode(lit->language_mode()); | 13741 shared_info->set_language_mode(lit->language_mode()); |
(...skipping 6342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20084 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr)) | 20084 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr)) |
20085 .Check(); | 20085 .Check(); |
20086 } | 20086 } |
20087 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked(); | 20087 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked(); |
20088 | 20088 |
20089 return ns; | 20089 return ns; |
20090 } | 20090 } |
20091 | 20091 |
20092 } // namespace internal | 20092 } // namespace internal |
20093 } // namespace v8 | 20093 } // namespace v8 |
OLD | NEW |