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/interpreter/bytecode-array-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
10 #include "src/interpreter/bytecode-dead-code-optimizer.h" | 10 #include "src/interpreter/bytecode-dead-code-optimizer.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 pipeline_(&bytecode_array_writer_) { | 36 pipeline_(&bytecode_array_writer_) { |
37 DCHECK_GE(parameter_count_, 0); | 37 DCHECK_GE(parameter_count_, 0); |
38 DCHECK_GE(context_register_count_, 0); | 38 DCHECK_GE(context_register_count_, 0); |
39 DCHECK_GE(local_register_count_, 0); | 39 DCHECK_GE(local_register_count_, 0); |
40 | 40 |
41 if (FLAG_ignition_deadcode) { | 41 if (FLAG_ignition_deadcode) { |
42 pipeline_ = new (zone) BytecodeDeadCodeOptimizer(pipeline_); | 42 pipeline_ = new (zone) BytecodeDeadCodeOptimizer(pipeline_); |
43 } | 43 } |
44 | 44 |
45 if (FLAG_ignition_peephole) { | 45 if (FLAG_ignition_peephole) { |
46 pipeline_ = new (zone) | 46 pipeline_ = new (zone) BytecodePeepholeOptimizer(pipeline_); |
47 BytecodePeepholeOptimizer(&constant_array_builder_, pipeline_); | |
48 } | 47 } |
49 | 48 |
50 if (FLAG_ignition_reo) { | 49 if (FLAG_ignition_reo) { |
51 pipeline_ = new (zone) BytecodeRegisterOptimizer( | 50 pipeline_ = new (zone) BytecodeRegisterOptimizer( |
52 zone, &temporary_allocator_, parameter_count, pipeline_); | 51 zone, &temporary_allocator_, parameter_count, pipeline_); |
53 } | 52 } |
54 | 53 |
55 return_position_ = | 54 return_position_ = |
56 literal ? std::max(literal->start_position(), literal->end_position() - 1) | 55 literal ? std::max(literal->start_position(), literal->end_position() - 1) |
57 : kNoSourcePosition; | 56 : kNoSourcePosition; |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 return Bytecode::kTailCall; | 964 return Bytecode::kTailCall; |
966 default: | 965 default: |
967 UNREACHABLE(); | 966 UNREACHABLE(); |
968 } | 967 } |
969 return Bytecode::kIllegal; | 968 return Bytecode::kIllegal; |
970 } | 969 } |
971 | 970 |
972 } // namespace interpreter | 971 } // namespace interpreter |
973 } // namespace internal | 972 } // namespace internal |
974 } // namespace v8 | 973 } // namespace v8 |
OLD | NEW |