| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/interpreter/bytecode-array-builder.h" | 7 #include "src/interpreter/bytecode-array-builder.h" |
| 8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
| 9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 .BinaryOperation(Token::Value::BIT_AND, reg, Strength::WEAK); | 77 .BinaryOperation(Token::Value::BIT_AND, reg, Strength::WEAK); |
| 78 | 78 |
| 79 // Emit shift operator invocations | 79 // Emit shift operator invocations |
| 80 builder.BinaryOperation(Token::Value::SHL, reg, Strength::WEAK) | 80 builder.BinaryOperation(Token::Value::SHL, reg, Strength::WEAK) |
| 81 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK) | 81 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK) |
| 82 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); | 82 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); |
| 83 | 83 |
| 84 // Emit unary operator invocations. | 84 // Emit unary operator invocations. |
| 85 builder.LogicalNot().TypeOf(); | 85 builder.LogicalNot().TypeOf(); |
| 86 | 86 |
| 87 // Emit new. |
| 88 builder.New(reg, reg, 0); |
| 89 |
| 87 // Emit test operator invocations. | 90 // Emit test operator invocations. |
| 88 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) | 91 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) |
| 89 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) | 92 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) |
| 90 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) | 93 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) |
| 91 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) | 94 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) |
| 92 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) | 95 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) |
| 93 .CompareOperation(Token::Value::GT, reg, Strength::WEAK) | 96 .CompareOperation(Token::Value::GT, reg, Strength::WEAK) |
| 94 .CompareOperation(Token::Value::LTE, reg, Strength::WEAK) | 97 .CompareOperation(Token::Value::LTE, reg, Strength::WEAK) |
| 95 .CompareOperation(Token::Value::GTE, reg, Strength::WEAK) | 98 .CompareOperation(Token::Value::GTE, reg, Strength::WEAK) |
| 96 .CompareOperation(Token::Value::INSTANCEOF, reg, Strength::WEAK) | 99 .CompareOperation(Token::Value::INSTANCEOF, reg, Strength::WEAK) |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 | 462 |
| 460 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 463 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 461 iterator.Advance(); | 464 iterator.Advance(); |
| 462 CHECK(iterator.done()); | 465 CHECK(iterator.done()); |
| 463 } | 466 } |
| 464 | 467 |
| 465 | 468 |
| 466 } // namespace interpreter | 469 } // namespace interpreter |
| 467 } // namespace internal | 470 } // namespace internal |
| 468 } // namespace v8 | 471 } // namespace v8 |
| OLD | NEW |