| 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 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 namespace interpreter { | 9 namespace interpreter { |
| 10 | 10 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadBooleanConstant(bool value) { | 320 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadBooleanConstant(bool value) { |
| 321 if (value) { | 321 if (value) { |
| 322 LoadTrue(); | 322 LoadTrue(); |
| 323 } else { | 323 } else { |
| 324 LoadFalse(); | 324 LoadFalse(); |
| 325 } | 325 } |
| 326 return *this; | 326 return *this; |
| 327 } | 327 } |
| 328 | 328 |
| 329 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadPrototypeOrInitialMap() { |
| 330 Output(Bytecode::kLdaInitialMap); |
| 331 return *this; |
| 332 } |
| 329 | 333 |
| 330 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadAccumulatorWithRegister( | 334 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadAccumulatorWithRegister( |
| 331 Register reg) { | 335 Register reg) { |
| 332 if (!IsRegisterInAccumulator(reg)) { | 336 if (!IsRegisterInAccumulator(reg)) { |
| 333 Output(Bytecode::kLdar, reg.ToRawOperand()); | 337 Output(Bytecode::kLdar, reg.ToRawOperand()); |
| 334 } | 338 } |
| 335 return *this; | 339 return *this; |
| 336 } | 340 } |
| 337 | 341 |
| 338 | 342 |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 } | 1687 } |
| 1684 | 1688 |
| 1685 // static | 1689 // static |
| 1686 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { | 1690 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { |
| 1687 return value.is_short_operand(); | 1691 return value.is_short_operand(); |
| 1688 } | 1692 } |
| 1689 | 1693 |
| 1690 } // namespace interpreter | 1694 } // namespace interpreter |
| 1691 } // namespace internal | 1695 } // namespace internal |
| 1692 } // namespace v8 | 1696 } // namespace v8 |
| OLD | NEW |