OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |