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 #include "src/compiler.h" | 6 #include "src/compiler.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace interpreter { | 10 namespace interpreter { |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 } | 1190 } |
1191 | 1191 |
1192 | 1192 |
1193 size_t BytecodeArrayBuilder::GetConstantPoolEntry(Handle<Object> object) { | 1193 size_t BytecodeArrayBuilder::GetConstantPoolEntry(Handle<Object> object) { |
1194 return constant_array_builder()->Insert(object); | 1194 return constant_array_builder()->Insert(object); |
1195 } | 1195 } |
1196 | 1196 |
1197 void BytecodeArrayBuilder::SetReturnPosition() { | 1197 void BytecodeArrayBuilder::SetReturnPosition() { |
1198 if (return_position_ == RelocInfo::kNoPosition) return; | 1198 if (return_position_ == RelocInfo::kNoPosition) return; |
1199 if (exit_seen_in_block_) return; | 1199 if (exit_seen_in_block_) return; |
1200 source_position_table_builder_.AddStatementPosition(bytecodes_.size(), | 1200 source_position_table_builder_.AddStatementPosition( |
1201 return_position_); | 1201 bytecodes_.size(), return_position_, |
| 1202 SourcePositionTableBuilder::OVERWRITE_DUPLICATE); |
1202 } | 1203 } |
1203 | 1204 |
1204 void BytecodeArrayBuilder::SetStatementPosition(Statement* stmt) { | 1205 void BytecodeArrayBuilder::SetStatementPosition(Statement* stmt) { |
1205 if (stmt->position() == RelocInfo::kNoPosition) return; | 1206 if (stmt->position() == RelocInfo::kNoPosition) return; |
1206 if (exit_seen_in_block_) return; | 1207 if (exit_seen_in_block_) return; |
1207 source_position_table_builder_.AddStatementPosition(bytecodes_.size(), | 1208 source_position_table_builder_.AddStatementPosition(bytecodes_.size(), |
1208 stmt->position()); | 1209 stmt->position()); |
1209 } | 1210 } |
1210 | 1211 |
1211 void BytecodeArrayBuilder::SetExpressionPosition(Expression* expr) { | 1212 void BytecodeArrayBuilder::SetExpressionPosition(Expression* expr) { |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 } | 1639 } |
1639 | 1640 |
1640 // static | 1641 // static |
1641 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { | 1642 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { |
1642 return value.is_short_operand(); | 1643 return value.is_short_operand(); |
1643 } | 1644 } |
1644 | 1645 |
1645 } // namespace interpreter | 1646 } // namespace interpreter |
1646 } // namespace internal | 1647 } // namespace internal |
1647 } // namespace v8 | 1648 } // namespace v8 |
OLD | NEW |