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

Side by Side Diff: src/parser.cc

Issue 712333003: Revert "Classes: Add support for arguments in default constructor" (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/runtime/runtime.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 ZoneList<Statement*>* body = NULL; 295 ZoneList<Statement*>* body = NULL;
296 296
297 { 297 {
298 AstNodeFactory<AstConstructionVisitor> function_factory( 298 AstNodeFactory<AstConstructionVisitor> function_factory(
299 ast_value_factory()); 299 ast_value_factory());
300 FunctionState function_state(&function_state_, &scope_, function_scope, 300 FunctionState function_state(&function_state_, &scope_, function_scope,
301 &function_factory); 301 &function_factory);
302 302
303 body = new (zone()) ZoneList<Statement*>(1, zone()); 303 body = new (zone()) ZoneList<Statement*>(1, zone());
304 if (call_super) { 304 if (call_super) {
305 Expression* prop = SuperReference(function_scope, factory(), pos);
305 ZoneList<Expression*>* args = 306 ZoneList<Expression*>* args =
306 new (zone()) ZoneList<Expression*>(0, zone()); 307 new (zone()) ZoneList<Expression*>(0, zone());
307 CallRuntime* call = factory()->NewCallRuntime( 308 Call* call = factory()->NewCall(prop, args, pos);
308 ast_value_factory()->empty_string(),
309 Runtime::FunctionForId(Runtime::kDefaultConstructorSuperCall), args,
310 pos);
311 body->Add(factory()->NewExpressionStatement(call, pos), zone()); 309 body->Add(factory()->NewExpressionStatement(call, pos), zone());
312 } 310 }
313 311
314 materialized_literal_count = function_state.materialized_literal_count(); 312 materialized_literal_count = function_state.materialized_literal_count();
315 expected_property_count = function_state.expected_property_count(); 313 expected_property_count = function_state.expected_property_count();
316 handler_count = function_state.handler_count(); 314 handler_count = function_state.handler_count();
317 315
318 ast_properties = *factory()->visitor()->ast_properties(); 316 ast_properties = *factory()->visitor()->ast_properties();
319 dont_optimize_reason = factory()->visitor()->dont_optimize_reason(); 317 dont_optimize_reason = factory()->visitor()->dont_optimize_reason();
320 } 318 }
(...skipping 4704 matching lines...) Expand 10 before | Expand all | Expand 10 after
5025 5023
5026 // We cannot internalize on a background thread; a foreground task will take 5024 // We cannot internalize on a background thread; a foreground task will take
5027 // care of calling Parser::Internalize just before compilation. 5025 // care of calling Parser::Internalize just before compilation.
5028 5026
5029 if (compile_options() == ScriptCompiler::kProduceParserCache) { 5027 if (compile_options() == ScriptCompiler::kProduceParserCache) {
5030 if (result != NULL) *info_->cached_data() = recorder.GetScriptData(); 5028 if (result != NULL) *info_->cached_data() = recorder.GetScriptData();
5031 log_ = NULL; 5029 log_ = NULL;
5032 } 5030 }
5033 } 5031 }
5034 } } // namespace v8::internal 5032 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698