| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 builder.Call(reg, reg, 0); | 53 builder.Call(reg, reg, 0); |
| 54 builder.CallRuntime(Runtime::kIsArray, reg, 1); | 54 builder.CallRuntime(Runtime::kIsArray, reg, 1); |
| 55 | 55 |
| 56 // Emit binary operator invocations. | 56 // Emit binary operator invocations. |
| 57 builder.BinaryOperation(Token::Value::ADD, reg) | 57 builder.BinaryOperation(Token::Value::ADD, reg) |
| 58 .BinaryOperation(Token::Value::SUB, reg) | 58 .BinaryOperation(Token::Value::SUB, reg) |
| 59 .BinaryOperation(Token::Value::MUL, reg) | 59 .BinaryOperation(Token::Value::MUL, reg) |
| 60 .BinaryOperation(Token::Value::DIV, reg) | 60 .BinaryOperation(Token::Value::DIV, reg) |
| 61 .BinaryOperation(Token::Value::MOD, reg); | 61 .BinaryOperation(Token::Value::MOD, reg); |
| 62 | 62 |
| 63 // Emit unary operator invocations. |
| 64 builder.LogicalNot().TypeOf(); |
| 65 |
| 63 // Emit test operator invocations. | 66 // Emit test operator invocations. |
| 64 builder.CompareOperation(Token::Value::EQ, reg, LanguageMode::SLOPPY) | 67 builder.CompareOperation(Token::Value::EQ, reg, LanguageMode::SLOPPY) |
| 65 .CompareOperation(Token::Value::NE, reg, LanguageMode::SLOPPY) | 68 .CompareOperation(Token::Value::NE, reg, LanguageMode::SLOPPY) |
| 66 .CompareOperation(Token::Value::EQ_STRICT, reg, LanguageMode::SLOPPY) | 69 .CompareOperation(Token::Value::EQ_STRICT, reg, LanguageMode::SLOPPY) |
| 67 .CompareOperation(Token::Value::NE_STRICT, reg, LanguageMode::SLOPPY) | 70 .CompareOperation(Token::Value::NE_STRICT, reg, LanguageMode::SLOPPY) |
| 68 .CompareOperation(Token::Value::LT, reg, LanguageMode::SLOPPY) | 71 .CompareOperation(Token::Value::LT, reg, LanguageMode::SLOPPY) |
| 69 .CompareOperation(Token::Value::GT, reg, LanguageMode::SLOPPY) | 72 .CompareOperation(Token::Value::GT, reg, LanguageMode::SLOPPY) |
| 70 .CompareOperation(Token::Value::LTE, reg, LanguageMode::SLOPPY) | 73 .CompareOperation(Token::Value::LTE, reg, LanguageMode::SLOPPY) |
| 71 .CompareOperation(Token::Value::GTE, reg, LanguageMode::SLOPPY) | 74 .CompareOperation(Token::Value::GTE, reg, LanguageMode::SLOPPY) |
| 72 .CompareOperation(Token::Value::INSTANCEOF, reg, LanguageMode::SLOPPY) | 75 .CompareOperation(Token::Value::INSTANCEOF, reg, LanguageMode::SLOPPY) |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 438 |
| 436 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 439 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 437 iterator.Advance(); | 440 iterator.Advance(); |
| 438 CHECK(iterator.done()); | 441 CHECK(iterator.done()); |
| 439 } | 442 } |
| 440 | 443 |
| 441 | 444 |
| 442 } // namespace interpreter | 445 } // namespace interpreter |
| 443 } // namespace internal | 446 } // namespace internal |
| 444 } // namespace v8 | 447 } // namespace v8 |
| OLD | NEW |