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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); | 132 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); |
133 | 133 |
134 // Emit new. | 134 // Emit new. |
135 builder.New(reg, reg, 0); | 135 builder.New(reg, reg, 0); |
136 builder.New(wide, wide, 0); | 136 builder.New(wide, wide, 0); |
137 | 137 |
138 // Emit test operator invocations. | 138 // Emit test operator invocations. |
139 builder.CompareOperation(Token::Value::EQ, reg) | 139 builder.CompareOperation(Token::Value::EQ, reg) |
140 .CompareOperation(Token::Value::NE, reg) | 140 .CompareOperation(Token::Value::NE, reg) |
141 .CompareOperation(Token::Value::EQ_STRICT, reg) | 141 .CompareOperation(Token::Value::EQ_STRICT, reg) |
142 .CompareOperation(Token::Value::NE_STRICT, reg) | |
143 .CompareOperation(Token::Value::LT, reg) | 142 .CompareOperation(Token::Value::LT, reg) |
144 .CompareOperation(Token::Value::GT, reg) | 143 .CompareOperation(Token::Value::GT, reg) |
145 .CompareOperation(Token::Value::LTE, reg) | 144 .CompareOperation(Token::Value::LTE, reg) |
146 .CompareOperation(Token::Value::GTE, reg) | 145 .CompareOperation(Token::Value::GTE, reg) |
147 .CompareOperation(Token::Value::INSTANCEOF, reg) | 146 .CompareOperation(Token::Value::INSTANCEOF, reg) |
148 .CompareOperation(Token::Value::IN, reg); | 147 .CompareOperation(Token::Value::IN, reg); |
149 | 148 |
150 // Emit cast operator invocations. | 149 // Emit cast operator invocations. |
151 builder.CastAccumulatorToNumber() | 150 builder.CastAccumulatorToNumber() |
152 .CastAccumulatorToJSObject() | 151 .CastAccumulatorToJSObject() |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 iterator.Advance(); | 647 iterator.Advance(); |
649 } | 648 } |
650 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 649 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
651 iterator.Advance(); | 650 iterator.Advance(); |
652 CHECK(iterator.done()); | 651 CHECK(iterator.done()); |
653 } | 652 } |
654 | 653 |
655 } // namespace interpreter | 654 } // namespace interpreter |
656 } // namespace internal | 655 } // namespace internal |
657 } // namespace v8 | 656 } // namespace v8 |
OLD | NEW |