OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 FrameStateType::kInterpretedFunction, | 496 FrameStateType::kInterpretedFunction, |
497 bytecode_array()->parameter_count(), | 497 bytecode_array()->parameter_count(), |
498 bytecode_array()->register_count(), info->shared_info())), | 498 bytecode_array()->register_count(), info->shared_info())), |
499 osr_ast_id_(info->osr_ast_id()), | 499 osr_ast_id_(info->osr_ast_id()), |
500 merge_environments_(local_zone), | 500 merge_environments_(local_zone), |
501 exception_handlers_(local_zone), | 501 exception_handlers_(local_zone), |
502 current_exception_handler_(0), | 502 current_exception_handler_(0), |
503 input_buffer_size_(0), | 503 input_buffer_size_(0), |
504 input_buffer_(nullptr), | 504 input_buffer_(nullptr), |
505 exit_controls_(local_zone), | 505 exit_controls_(local_zone), |
506 is_liveness_analysis_enabled_(FLAG_analyze_environment_liveness && | 506 is_liveness_analysis_enabled_(FLAG_analyze_environment_liveness), |
507 info->is_deoptimization_enabled()), | |
508 state_values_cache_(jsgraph), | 507 state_values_cache_(jsgraph), |
509 liveness_analyzer_( | 508 liveness_analyzer_( |
510 static_cast<size_t>(bytecode_array()->register_count()), true, | 509 static_cast<size_t>(bytecode_array()->register_count()), true, |
511 local_zone), | 510 local_zone), |
512 source_positions_(source_positions), | 511 source_positions_(source_positions), |
513 start_position_(info->shared_info()->start_position(), inlining_id) {} | 512 start_position_(info->shared_info()->start_position(), inlining_id) { |
| 513 // Bytecode graph builder assumes deoptimziation is enabled. |
| 514 DCHECK(info->is_deoptimization_enabled()); |
| 515 } |
514 | 516 |
515 Node* BytecodeGraphBuilder::GetNewTarget() { | 517 Node* BytecodeGraphBuilder::GetNewTarget() { |
516 if (!new_target_.is_set()) { | 518 if (!new_target_.is_set()) { |
517 int params = bytecode_array()->parameter_count(); | 519 int params = bytecode_array()->parameter_count(); |
518 int index = Linkage::GetJSCallNewTargetParamIndex(params); | 520 int index = Linkage::GetJSCallNewTargetParamIndex(params); |
519 const Operator* op = common()->Parameter(index, "%new.target"); | 521 const Operator* op = common()->Parameter(index, "%new.target"); |
520 Node* node = NewNode(op, graph()->start()); | 522 Node* node = NewNode(op, graph()->start()); |
521 new_target_.set(node); | 523 new_target_.set(node); |
522 } | 524 } |
523 return new_target_.get(); | 525 return new_target_.get(); |
(...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2226 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2228 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2227 it->Advance(); | 2229 it->Advance(); |
2228 } else { | 2230 } else { |
2229 DCHECK_GT(it->code_offset(), offset); | 2231 DCHECK_GT(it->code_offset(), offset); |
2230 } | 2232 } |
2231 } | 2233 } |
2232 | 2234 |
2233 } // namespace compiler | 2235 } // namespace compiler |
2234 } // namespace internal | 2236 } // namespace internal |
2235 } // namespace v8 | 2237 } // namespace v8 |
OLD | NEW |