| 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 "src/interpreter/bytecode-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
| 10 #include "test/unittests/test-utils.h" | 10 #include "test/unittests/test-utils.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 // Emit shift operator invocations | 132 // Emit shift operator invocations |
| 133 builder.BinaryOperation(Token::Value::SHL, reg) | 133 builder.BinaryOperation(Token::Value::SHL, reg) |
| 134 .BinaryOperation(Token::Value::SAR, reg) | 134 .BinaryOperation(Token::Value::SAR, reg) |
| 135 .BinaryOperation(Token::Value::SHR, reg); | 135 .BinaryOperation(Token::Value::SHR, reg); |
| 136 | 136 |
| 137 // Emit count operatior invocations | 137 // Emit count operatior invocations |
| 138 builder.CountOperation(Token::Value::ADD).CountOperation(Token::Value::SUB); | 138 builder.CountOperation(Token::Value::ADD).CountOperation(Token::Value::SUB); |
| 139 | 139 |
| 140 // Emit unary operator invocations. | 140 // Emit unary operator invocations. |
| 141 builder.LogicalNot().TypeOf(); | 141 builder |
| 142 .LogicalNot() // ToBooleanLogicalNot |
| 143 .LogicalNot() // non-ToBoolean LogicalNot |
| 144 .TypeOf(); |
| 142 | 145 |
| 143 // Emit delete | 146 // Emit delete |
| 144 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); | 147 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); |
| 145 | 148 |
| 146 // Emit new. | 149 // Emit new. |
| 147 builder.New(reg, reg, 0); | 150 builder.New(reg, reg, 0); |
| 148 builder.New(wide, wide, 0); | 151 builder.New(wide, wide, 0); |
| 149 | 152 |
| 150 // Emit test operator invocations. | 153 // Emit test operator invocations. |
| 151 builder.CompareOperation(Token::Value::EQ, reg) | 154 builder.CompareOperation(Token::Value::EQ, reg) |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 iterator.Advance(); | 720 iterator.Advance(); |
| 718 } | 721 } |
| 719 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 722 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 720 iterator.Advance(); | 723 iterator.Advance(); |
| 721 CHECK(iterator.done()); | 724 CHECK(iterator.done()); |
| 722 } | 725 } |
| 723 | 726 |
| 724 } // namespace interpreter | 727 } // namespace interpreter |
| 725 } // namespace internal | 728 } // namespace internal |
| 726 } // namespace v8 | 729 } // namespace v8 |
| OLD | NEW |