| 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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
| 6 | 6 |
| 7 #include "src/ast/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { | 81 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { |
| 82 return MakeCode(info, info->isolate()->stack_guard()->real_climit()); | 82 return MakeCode(info, info->isolate()->stack_guard()->real_climit()); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // static | 85 // static |
| 86 bool FullCodeGenerator::MakeCode(CompilationInfo* info, uintptr_t stack_limit) { | 86 bool FullCodeGenerator::MakeCode(CompilationInfo* info, uintptr_t stack_limit) { |
| 87 Isolate* isolate = info->isolate(); | 87 Isolate* isolate = info->isolate(); |
| 88 | 88 |
| 89 DCHECK(!info->shared_info()->must_use_ignition_turbo()); | 89 DCHECK(!info->shared_info()->must_use_ignition_turbo()); |
| 90 DCHECK(!FLAG_minimal); | 90 DCHECK(!FLAG_minimal); |
| 91 DCHECK_NULL(info->literal()->parameter_init_block()); |
| 91 RuntimeCallTimerScope runtimeTimer(isolate, | 92 RuntimeCallTimerScope runtimeTimer(isolate, |
| 92 &RuntimeCallStats::CompileFullCode); | 93 &RuntimeCallStats::CompileFullCode); |
| 93 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); | 94 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); |
| 94 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileFullCode"); | 95 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileFullCode"); |
| 95 | 96 |
| 96 Handle<Script> script = info->script(); | 97 Handle<Script> script = info->script(); |
| 97 if (!script->IsUndefined(isolate) && | 98 if (!script->IsUndefined(isolate) && |
| 98 !script->source()->IsUndefined(isolate)) { | 99 !script->source()->IsUndefined(isolate)) { |
| 99 int len = String::cast(script->source())->length(); | 100 int len = String::cast(script->source())->length(); |
| 100 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 101 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
| (...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1440 | 1441 |
| 1441 void FullCodeGenerator::VisitSpread(Spread* expr) { UNREACHABLE(); } | 1442 void FullCodeGenerator::VisitSpread(Spread* expr) { UNREACHABLE(); } |
| 1442 | 1443 |
| 1443 | 1444 |
| 1444 void FullCodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { | 1445 void FullCodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { |
| 1445 UNREACHABLE(); | 1446 UNREACHABLE(); |
| 1446 } | 1447 } |
| 1447 | 1448 |
| 1448 void FullCodeGenerator::VisitGetIterator(GetIterator* expr) { UNREACHABLE(); } | 1449 void FullCodeGenerator::VisitGetIterator(GetIterator* expr) { UNREACHABLE(); } |
| 1449 | 1450 |
| 1451 void FullCodeGenerator::VisitInternalVariable(InternalVariable* expr) { |
| 1452 UNREACHABLE(); |
| 1453 } |
| 1454 |
| 1450 void FullCodeGenerator::VisitRewritableExpression(RewritableExpression* expr) { | 1455 void FullCodeGenerator::VisitRewritableExpression(RewritableExpression* expr) { |
| 1451 Visit(expr->expression()); | 1456 Visit(expr->expression()); |
| 1452 } | 1457 } |
| 1453 | 1458 |
| 1454 | 1459 |
| 1455 bool FullCodeGenerator::TryLiteralCompare(CompareOperation* expr) { | 1460 bool FullCodeGenerator::TryLiteralCompare(CompareOperation* expr) { |
| 1456 Expression* sub_expr; | 1461 Expression* sub_expr; |
| 1457 Handle<String> check; | 1462 Handle<String> check; |
| 1458 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { | 1463 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { |
| 1459 SetExpressionPosition(expr); | 1464 SetExpressionPosition(expr); |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 return info_->has_simple_parameters(); | 1608 return info_->has_simple_parameters(); |
| 1604 } | 1609 } |
| 1605 | 1610 |
| 1606 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1611 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
| 1607 | 1612 |
| 1608 #undef __ | 1613 #undef __ |
| 1609 | 1614 |
| 1610 | 1615 |
| 1611 } // namespace internal | 1616 } // namespace internal |
| 1612 } // namespace v8 | 1617 } // namespace v8 |
| OLD | NEW |