Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: src/objects.cc

Issue 2414003002: Move function length tracking from Scope to (Pre)?ParserFormalParameters. (Closed)
Patch Set: oops cont Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698