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

Unified Diff: src/ast.h

Issue 703603005: Classes: Fix issue with default constructor crash (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « no previous file | src/parser.cc » ('j') | src/parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index aa23b4e237afa7602613a5b6a151adf0c5536608..48f8fac79406246cc6e0d44b38a7df6372b25140 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -3622,6 +3622,31 @@ class AstNodeFactory FINAL BASE_EMBEDDED {
VISIT_AND_RETURN(ClassLiteral, lit)
}
+ FunctionLiteral* NewDefaultConstructor(const AstRawString* name,
+ AstValueFactory* ast_value_factory,
+ Scope* scope, int position) {
+ ZoneList<Statement*>* body = new(zone_) ZoneList<Statement*>(0, zone_);
+ int materialized_literal_count = 0;
+ int expected_property_count = 0;
+ int handler_count = 0;
+ int parameter_count = 0;
+
+ FunctionLiteral::FunctionType function_type =
+ FunctionLiteral::NAMED_EXPRESSION;
+ if (name == NULL) {
+ name = ast_value_factory->empty_string();
+ function_type = FunctionLiteral::ANONYMOUS_EXPRESSION;
+ }
+
+ return NewFunctionLiteral(name, ast_value_factory, scope, body,
+ materialized_literal_count, expected_property_count, handler_count,
+ parameter_count, FunctionLiteral::kNoDuplicateParameters,
+ FunctionLiteral::ANONYMOUS_EXPRESSION, FunctionLiteral::kIsFunction,
+ FunctionLiteral::kNotParenthesized, FunctionKind::kNormalFunction,
+ position);
+ }
+
+
NativeFunctionLiteral* NewNativeFunctionLiteral(const AstRawString* name,
v8::Extension* extension,
int pos) {
« no previous file with comments | « no previous file | src/parser.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698