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 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 } | 1186 } |
1187 | 1187 |
1188 | 1188 |
1189 size_t BytecodeArrayBuilder::GetConstantPoolEntry(Handle<Object> object) { | 1189 size_t BytecodeArrayBuilder::GetConstantPoolEntry(Handle<Object> object) { |
1190 return constant_array_builder()->Insert(object); | 1190 return constant_array_builder()->Insert(object); |
1191 } | 1191 } |
1192 | 1192 |
1193 void BytecodeArrayBuilder::SetReturnPosition() { | 1193 void BytecodeArrayBuilder::SetReturnPosition() { |
1194 if (return_position_ == RelocInfo::kNoPosition) return; | 1194 if (return_position_ == RelocInfo::kNoPosition) return; |
1195 if (exit_seen_in_block_) return; | 1195 if (exit_seen_in_block_) return; |
1196 source_position_table_builder_.AddStatementPosition(bytecodes_.size(), | 1196 source_position_table_builder_.AddStatementPosition( |
1197 return_position_); | 1197 bytecodes_.size(), return_position_, |
| 1198 SourcePositionTableBuilder::OVERWRITE_DUPLICATE); |
1198 } | 1199 } |
1199 | 1200 |
1200 void BytecodeArrayBuilder::SetStatementPosition(Statement* stmt) { | 1201 void BytecodeArrayBuilder::SetStatementPosition(Statement* stmt) { |
1201 if (stmt->position() == RelocInfo::kNoPosition) return; | 1202 if (stmt->position() == RelocInfo::kNoPosition) return; |
1202 if (exit_seen_in_block_) return; | 1203 if (exit_seen_in_block_) return; |
1203 source_position_table_builder_.AddStatementPosition(bytecodes_.size(), | 1204 source_position_table_builder_.AddStatementPosition(bytecodes_.size(), |
1204 stmt->position()); | 1205 stmt->position()); |
1205 } | 1206 } |
1206 | 1207 |
1207 void BytecodeArrayBuilder::SetExpressionPosition(Expression* expr) { | 1208 void BytecodeArrayBuilder::SetExpressionPosition(Expression* expr) { |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 } | 1635 } |
1635 | 1636 |
1636 // static | 1637 // static |
1637 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { | 1638 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { |
1638 return value.is_short_operand(); | 1639 return value.is_short_operand(); |
1639 } | 1640 } |
1640 | 1641 |
1641 } // namespace interpreter | 1642 } // namespace interpreter |
1642 } // namespace internal | 1643 } // namespace internal |
1643 } // namespace v8 | 1644 } // namespace v8 |
OLD | NEW |