 Chromium Code Reviews
 Chromium Code Reviews Issue 1386133002:
  [Interpreter] Add bitwise operators (Or, Xor, And) to interpreter  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 1386133002:
  [Interpreter] Add bitwise operators (Or, Xor, And) to interpreter  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| Index: test/cctest/interpreter/test-bytecode-generator.cc | 
| diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc | 
| index c41dee3df9beae2c73dda7ea0252e570974e97ea..bb398649716c488c3a6e1716b07be9ccd2f1d220 100644 | 
| --- a/test/cctest/interpreter/test-bytecode-generator.cc | 
| +++ b/test/cctest/interpreter/test-bytecode-generator.cc | 
| @@ -804,6 +804,48 @@ TEST(CallRuntime) { | 
| }, | 
| }, | 
| { | 
| + "function f() { return %BitwiseOr(1, 2) }\nf()", | 
| 
rmcilroy
2015/10/06 11:09:29
This isn't testing your binary operators, it is ch
 
mythria
2015/10/06 13:47:40
Done.
 | 
| + 2 * kPointerSize, | 
| + 1, | 
| + 14, | 
| + { | 
| + B(LdaSmi8), U8(1), // | 
| + B(Star), R(0), // | 
| + B(LdaSmi8), U8(2), // | 
| + B(Star), R(1), // | 
| + B(CallRuntime), U16(Runtime::kBitwiseOr), R(0), U8(2), // | 
| + B(Return) // | 
| + }, | 
| + }, | 
| + { | 
| + "function f() { return %BitwiseXor(1, 2) }\nf()", | 
| 
rmcilroy
2015/10/06 11:09:29
ditto, with '^'.
 
mythria
2015/10/06 13:47:40
Done.
 | 
| + 2 * kPointerSize, | 
| + 1, | 
| + 14, | 
| + { | 
| + B(LdaSmi8), U8(1), // | 
| + B(Star), R(0), // | 
| + B(LdaSmi8), U8(2), // | 
| + B(Star), R(1), // | 
| + B(CallRuntime), U16(Runtime::kBitwiseXor), R(0), U8(2), // | 
| + B(Return) // | 
| + }, | 
| + }, | 
| + { | 
| + "function f() { return %BitwiseAnd(1, 2) }\nf()", | 
| 
rmcilroy
2015/10/06 11:09:28
ditto with '&'
 
mythria
2015/10/06 13:47:40
Done.
 | 
| + 2 * kPointerSize, | 
| + 1, | 
| + 14, | 
| + { | 
| + B(LdaSmi8), U8(1), // | 
| + B(Star), R(0), // | 
| + B(LdaSmi8), U8(2), // | 
| + B(Star), R(1), // | 
| + B(CallRuntime), U16(Runtime::kBitwiseAnd), R(0), U8(2), // | 
| + B(Return) // | 
| + }, | 
| + }, | 
| + { | 
| "function f() { return %Add(1, 2) }\nf()", | 
| 2 * kPointerSize, | 
| 1, |