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.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // TODO(turbofan): Inlining into a try-block is not yet supported. | 407 // TODO(turbofan): Inlining into a try-block is not yet supported. |
408 if (NodeProperties::IsExceptionalCall(node)) { | 408 if (NodeProperties::IsExceptionalCall(node)) { |
409 TRACE("Not inlining %s into %s because of surrounding try-block\n", | 409 TRACE("Not inlining %s into %s because of surrounding try-block\n", |
410 shared_info->DebugName()->ToCString().get(), | 410 shared_info->DebugName()->ToCString().get(), |
411 info_->shared_info()->DebugName()->ToCString().get()); | 411 info_->shared_info()->DebugName()->ToCString().get()); |
412 return NoChange(); | 412 return NoChange(); |
413 } | 413 } |
414 | 414 |
415 Zone zone(info_->isolate()->allocator()); | 415 Zone zone(info_->isolate()->allocator()); |
416 ParseInfo parse_info(&zone, function); | 416 ParseInfo parse_info(&zone, function); |
417 CompilationInfo info(&parse_info); | 417 CompilationInfo info(&parse_info, function); |
418 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); | 418 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); |
419 | 419 |
420 if (!Compiler::ParseAndAnalyze(info.parse_info())) { | 420 if (!Compiler::ParseAndAnalyze(info.parse_info())) { |
421 TRACE("Not inlining %s into %s because parsing failed\n", | 421 TRACE("Not inlining %s into %s because parsing failed\n", |
422 shared_info->DebugName()->ToCString().get(), | 422 shared_info->DebugName()->ToCString().get(), |
423 info_->shared_info()->DebugName()->ToCString().get()); | 423 info_->shared_info()->DebugName()->ToCString().get()); |
424 if (info_->isolate()->has_pending_exception()) { | 424 if (info_->isolate()->has_pending_exception()) { |
425 info_->isolate()->clear_pending_exception(); | 425 info_->isolate()->clear_pending_exception(); |
426 } | 426 } |
427 return NoChange(); | 427 return NoChange(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 node, frame_state, call.formal_arguments(), | 554 node, frame_state, call.formal_arguments(), |
555 FrameStateType::kArgumentsAdaptor, shared_info); | 555 FrameStateType::kArgumentsAdaptor, shared_info); |
556 } | 556 } |
557 | 557 |
558 return InlineCall(node, new_target, context, frame_state, start, end); | 558 return InlineCall(node, new_target, context, frame_state, start, end); |
559 } | 559 } |
560 | 560 |
561 } // namespace compiler | 561 } // namespace compiler |
562 } // namespace internal | 562 } // namespace internal |
563 } // namespace v8 | 563 } // namespace v8 |
OLD | NEW |