| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToJSObject() { | 380 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToJSObject() { |
| 381 Output(Bytecode::kToObject); | 381 Output(Bytecode::kToObject); |
| 382 return *this; | 382 return *this; |
| 383 } | 383 } |
| 384 | 384 |
| 385 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToName() { | 385 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToName() { |
| 386 Output(Bytecode::kToName); | 386 Output(Bytecode::kToName); |
| 387 return *this; | 387 return *this; |
| 388 } | 388 } |
| 389 | 389 |
| 390 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToNumber() { | 390 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToNumber( |
| 391 Output(Bytecode::kToNumber); | 391 Register out) { |
| 392 Output(Bytecode::kToNumber, RegisterOperand(out)); |
| 392 return *this; | 393 return *this; |
| 393 } | 394 } |
| 394 | 395 |
| 395 BytecodeArrayBuilder& BytecodeArrayBuilder::Bind(BytecodeLabel* label) { | 396 BytecodeArrayBuilder& BytecodeArrayBuilder::Bind(BytecodeLabel* label) { |
| 396 pipeline_->BindLabel(label); | 397 pipeline_->BindLabel(label); |
| 397 LeaveBasicBlock(); | 398 LeaveBasicBlock(); |
| 398 return *this; | 399 return *this; |
| 399 } | 400 } |
| 400 | 401 |
| 401 BytecodeArrayBuilder& BytecodeArrayBuilder::Bind(const BytecodeLabel& target, | 402 BytecodeArrayBuilder& BytecodeArrayBuilder::Bind(const BytecodeLabel& target, |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 return Bytecode::kTailCall; | 933 return Bytecode::kTailCall; |
| 933 default: | 934 default: |
| 934 UNREACHABLE(); | 935 UNREACHABLE(); |
| 935 } | 936 } |
| 936 return Bytecode::kIllegal; | 937 return Bytecode::kIllegal; |
| 937 } | 938 } |
| 938 | 939 |
| 939 } // namespace interpreter | 940 } // namespace interpreter |
| 940 } // namespace internal | 941 } // namespace internal |
| 941 } // namespace v8 | 942 } // namespace v8 |
| OLD | NEW |