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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadBooleanConstant(bool value) { | 326 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadBooleanConstant(bool value) { |
327 if (value) { | 327 if (value) { |
328 LoadTrue(); | 328 LoadTrue(); |
329 } else { | 329 } else { |
330 LoadFalse(); | 330 LoadFalse(); |
331 } | 331 } |
332 return *this; | 332 return *this; |
333 } | 333 } |
334 | 334 |
335 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadPrototypeOrInitialMap() { | |
336 Output(Bytecode::kLdaInitialMap); | |
337 return *this; | |
338 } | |
339 | |
340 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadAccumulatorWithRegister( | 335 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadAccumulatorWithRegister( |
341 Register reg) { | 336 Register reg) { |
342 if (!IsRegisterInAccumulator(reg)) { | 337 if (!IsRegisterInAccumulator(reg)) { |
343 Output(Bytecode::kLdar, reg.ToRawOperand()); | 338 Output(Bytecode::kLdar, reg.ToRawOperand()); |
344 } | 339 } |
345 return *this; | 340 return *this; |
346 } | 341 } |
347 | 342 |
348 | 343 |
349 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreAccumulatorInRegister( | 344 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreAccumulatorInRegister( |
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1686 } | 1681 } |
1687 | 1682 |
1688 // static | 1683 // static |
1689 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { | 1684 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { |
1690 return value.is_short_operand(); | 1685 return value.is_short_operand(); |
1691 } | 1686 } |
1692 | 1687 |
1693 } // namespace interpreter | 1688 } // namespace interpreter |
1694 } // namespace internal | 1689 } // namespace internal |
1695 } // namespace v8 | 1690 } // namespace v8 |
OLD | NEW |