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

Unified Diff: src/objects.cc

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)
Patch Set: whitespace Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 7f8f9ab1ca6affa801a2e9756ac3593bfa713a90..f7330146df5e9b746531357f2d385e85c5a3b5ce 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13583,7 +13583,7 @@ void SharedFunctionInfo::InitFromFunctionLiteral(
Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) {
// When adding fields here, make sure DeclarationScope::AnalyzePartially is
// updated accordingly.
- shared_info->set_length(lit->scope()->default_function_length());
+ shared_info->set_length(lit->scope()->arity());
shared_info->set_internal_formal_parameter_count(lit->parameter_count());
shared_info->set_function_token_position(lit->function_token_position());
shared_info->set_start_position(lit->start_position());
@@ -13607,6 +13607,9 @@ void SharedFunctionInfo::InitFromFunctionLiteral(
}
shared_info->set_needs_home_object(lit->scope()->NeedsHomeObject());
shared_info->set_asm_function(lit->scope()->asm_function());
+ shared_info->set_requires_class_field_init(lit->requires_class_field_init());
+ shared_info->set_is_class_field_initializer(
+ lit->is_class_field_initializer());
SetExpectedNofPropertiesFromEstimate(shared_info, lit);
}
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698