| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/js-inlining.h" | 5 #include "src/compiler/js-inlining.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/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 ParseInfo parse_info(&zone, function); | 475 ParseInfo parse_info(&zone, function); |
| 476 CompilationInfo info(&parse_info, function); | 476 CompilationInfo info(&parse_info, function); |
| 477 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); | 477 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); |
| 478 if (info_->is_type_feedback_enabled()) info.MarkAsTypeFeedbackEnabled(); | 478 if (info_->is_type_feedback_enabled()) info.MarkAsTypeFeedbackEnabled(); |
| 479 if (info_->is_optimizing_from_bytecode()) info.MarkAsOptimizeFromBytecode(); | 479 if (info_->is_optimizing_from_bytecode()) info.MarkAsOptimizeFromBytecode(); |
| 480 | 480 |
| 481 if (info.is_optimizing_from_bytecode() && !Compiler::EnsureBytecode(&info)) { | 481 if (info.is_optimizing_from_bytecode() && !Compiler::EnsureBytecode(&info)) { |
| 482 TRACE("Not inlining %s into %s because bytecode generation failed\n", | 482 TRACE("Not inlining %s into %s because bytecode generation failed\n", |
| 483 shared_info->DebugName()->ToCString().get(), | 483 shared_info->DebugName()->ToCString().get(), |
| 484 info_->shared_info()->DebugName()->ToCString().get()); | 484 info_->shared_info()->DebugName()->ToCString().get()); |
| 485 DCHECK(!info_->isolate()->has_pending_exception()); | 485 if (info_->isolate()->has_pending_exception()) { |
| 486 info_->isolate()->clear_pending_exception(); |
| 487 } |
| 486 return NoChange(); | 488 return NoChange(); |
| 487 } | 489 } |
| 488 | 490 |
| 489 if (!info.is_optimizing_from_bytecode() && | 491 if (!info.is_optimizing_from_bytecode() && |
| 490 !Compiler::ParseAndAnalyze(info.parse_info())) { | 492 !Compiler::ParseAndAnalyze(info.parse_info())) { |
| 491 TRACE("Not inlining %s into %s because parsing failed\n", | 493 TRACE("Not inlining %s into %s because parsing failed\n", |
| 492 shared_info->DebugName()->ToCString().get(), | 494 shared_info->DebugName()->ToCString().get(), |
| 493 info_->shared_info()->DebugName()->ToCString().get()); | 495 info_->shared_info()->DebugName()->ToCString().get()); |
| 494 if (info_->isolate()->has_pending_exception()) { | 496 if (info_->isolate()->has_pending_exception()) { |
| 495 info_->isolate()->clear_pending_exception(); | 497 info_->isolate()->clear_pending_exception(); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 | 691 |
| 690 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } | 692 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } |
| 691 | 693 |
| 692 SimplifiedOperatorBuilder* JSInliner::simplified() const { | 694 SimplifiedOperatorBuilder* JSInliner::simplified() const { |
| 693 return jsgraph()->simplified(); | 695 return jsgraph()->simplified(); |
| 694 } | 696 } |
| 695 | 697 |
| 696 } // namespace compiler | 698 } // namespace compiler |
| 697 } // namespace internal | 699 } // namespace internal |
| 698 } // namespace v8 | 700 } // namespace v8 |
| OLD | NEW |