| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); | 140 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); |
| 141 | 141 |
| 142 // Emit count operatior invocations | 142 // Emit count operatior invocations |
| 143 builder.CountOperation(Token::Value::ADD, Strength::WEAK) | 143 builder.CountOperation(Token::Value::ADD, Strength::WEAK) |
| 144 .CountOperation(Token::Value::SUB, Strength::WEAK); | 144 .CountOperation(Token::Value::SUB, Strength::WEAK); |
| 145 | 145 |
| 146 // Emit unary operator invocations. | 146 // Emit unary operator invocations. |
| 147 builder.LogicalNot().TypeOf(); | 147 builder.LogicalNot().TypeOf(); |
| 148 | 148 |
| 149 // Emit delete | 149 // Emit delete |
| 150 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); | 150 builder.Delete(reg, LanguageMode::SLOPPY) |
| 151 .Delete(reg, LanguageMode::STRICT) |
| 152 .DeleteLookupSlot(); |
| 151 | 153 |
| 152 // Emit new. | 154 // Emit new. |
| 153 builder.New(reg, reg, 0); | 155 builder.New(reg, reg, 0); |
| 154 | 156 |
| 155 // Emit test operator invocations. | 157 // Emit test operator invocations. |
| 156 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) | 158 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) |
| 157 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) | 159 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) |
| 158 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) | 160 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) |
| 159 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) | 161 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) |
| 160 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) | 162 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 iterator.Advance(); | 668 iterator.Advance(); |
| 667 } | 669 } |
| 668 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 670 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 669 iterator.Advance(); | 671 iterator.Advance(); |
| 670 CHECK(iterator.done()); | 672 CHECK(iterator.done()); |
| 671 } | 673 } |
| 672 | 674 |
| 673 } // namespace interpreter | 675 } // namespace interpreter |
| 674 } // namespace internal | 676 } // namespace internal |
| 675 } // namespace v8 | 677 } // namespace v8 |
| OLD | NEW |