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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK) | 98 .BinaryOperation(Token::Value::SAR, reg, Strength::WEAK) |
99 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); | 99 .BinaryOperation(Token::Value::SHR, reg, Strength::WEAK); |
100 | 100 |
101 // Emit count operatior invocations | 101 // Emit count operatior invocations |
102 builder.CountOperation(Token::Value::ADD, Strength::WEAK) | 102 builder.CountOperation(Token::Value::ADD, Strength::WEAK) |
103 .CountOperation(Token::Value::SUB, Strength::WEAK); | 103 .CountOperation(Token::Value::SUB, Strength::WEAK); |
104 | 104 |
105 // Emit unary operator invocations. | 105 // Emit unary operator invocations. |
106 builder.LogicalNot().TypeOf(); | 106 builder.LogicalNot().TypeOf(); |
107 | 107 |
| 108 // Emit delete |
| 109 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); |
108 | 110 |
109 // Emit new. | 111 // Emit new. |
110 builder.New(reg, reg, 0); | 112 builder.New(reg, reg, 0); |
111 | 113 |
112 // Emit test operator invocations. | 114 // Emit test operator invocations. |
113 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) | 115 builder.CompareOperation(Token::Value::EQ, reg, Strength::WEAK) |
114 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) | 116 .CompareOperation(Token::Value::NE, reg, Strength::WEAK) |
115 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) | 117 .CompareOperation(Token::Value::EQ_STRICT, reg, Strength::WEAK) |
116 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) | 118 .CompareOperation(Token::Value::NE_STRICT, reg, Strength::WEAK) |
117 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) | 119 .CompareOperation(Token::Value::LT, reg, Strength::WEAK) |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 | 539 |
538 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 540 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
539 iterator.Advance(); | 541 iterator.Advance(); |
540 CHECK(iterator.done()); | 542 CHECK(iterator.done()); |
541 } | 543 } |
542 | 544 |
543 | 545 |
544 } // namespace interpreter | 546 } // namespace interpreter |
545 } // namespace internal | 547 } // namespace internal |
546 } // namespace v8 | 548 } // namespace v8 |
OLD | NEW |