| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { | 376 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { |
| 377 Output(Bytecode::kPushContext, RegisterOperand(context)); | 377 Output(Bytecode::kPushContext, RegisterOperand(context)); |
| 378 return *this; | 378 return *this; |
| 379 } | 379 } |
| 380 | 380 |
| 381 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { | 381 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { |
| 382 Output(Bytecode::kPopContext, RegisterOperand(context)); | 382 Output(Bytecode::kPopContext, RegisterOperand(context)); |
| 383 return *this; | 383 return *this; |
| 384 } | 384 } |
| 385 | 385 |
| 386 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToJSObject() { | 386 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToJSObject( |
| 387 Output(Bytecode::kToObject); | 387 Register out) { |
| 388 Output(Bytecode::kToObject, RegisterOperand(out)); |
| 388 return *this; | 389 return *this; |
| 389 } | 390 } |
| 390 | 391 |
| 391 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToName( | 392 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToName( |
| 392 Register out) { | 393 Register out) { |
| 393 Output(Bytecode::kToName, RegisterOperand(out)); | 394 Output(Bytecode::kToName, RegisterOperand(out)); |
| 394 return *this; | 395 return *this; |
| 395 } | 396 } |
| 396 | 397 |
| 397 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToNumber( | 398 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToNumber( |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 return_seen_in_block_ = true; | 492 return_seen_in_block_ = true; |
| 492 return *this; | 493 return *this; |
| 493 } | 494 } |
| 494 | 495 |
| 495 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() { | 496 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() { |
| 496 Output(Bytecode::kDebugger); | 497 Output(Bytecode::kDebugger); |
| 497 return *this; | 498 return *this; |
| 498 } | 499 } |
| 499 | 500 |
| 500 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare( | 501 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare( |
| 501 Register cache_info_triple) { | 502 Register receiver, Register cache_info_triple) { |
| 502 Output(Bytecode::kForInPrepare, RegisterOperand(cache_info_triple)); | 503 Output(Bytecode::kForInPrepare, RegisterOperand(receiver), |
| 504 RegisterOperand(cache_info_triple)); |
| 503 return *this; | 505 return *this; |
| 504 } | 506 } |
| 505 | 507 |
| 506 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInDone(Register index, | 508 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInDone(Register index, |
| 507 Register cache_length) { | 509 Register cache_length) { |
| 508 Output(Bytecode::kForInDone, RegisterOperand(index), | 510 Output(Bytecode::kForInDone, RegisterOperand(index), |
| 509 RegisterOperand(cache_length)); | 511 RegisterOperand(cache_length)); |
| 510 return *this; | 512 return *this; |
| 511 } | 513 } |
| 512 | 514 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 return Bytecode::kTailCall; | 956 return Bytecode::kTailCall; |
| 955 default: | 957 default: |
| 956 UNREACHABLE(); | 958 UNREACHABLE(); |
| 957 } | 959 } |
| 958 return Bytecode::kIllegal; | 960 return Bytecode::kIllegal; |
| 959 } | 961 } |
| 960 | 962 |
| 961 } // namespace interpreter | 963 } // namespace interpreter |
| 962 } // namespace internal | 964 } // namespace internal |
| 963 } // namespace v8 | 965 } // namespace v8 |
| OLD | NEW |