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/compiler/js-graph.h" | 5 #include "src/compiler/js-graph.h" |
6 #include "src/compiler/js-typed-lowering.h" | 6 #include "src/compiler/js-typed-lowering.h" |
7 #include "src/compiler/machine-operator.h" | 7 #include "src/compiler/machine-operator.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 } | 371 } |
372 | 372 |
373 | 373 |
374 // A helper class for testing lowering of bitwise operators. | 374 // A helper class for testing lowering of bitwise operators. |
375 class JSBitwiseTypedLoweringTester : public JSTypedLoweringTester { | 375 class JSBitwiseTypedLoweringTester : public JSTypedLoweringTester { |
376 public: | 376 public: |
377 explicit JSBitwiseTypedLoweringTester(LanguageMode language_mode) | 377 explicit JSBitwiseTypedLoweringTester(LanguageMode language_mode) |
378 : JSTypedLoweringTester(), language_mode_(language_mode) { | 378 : JSTypedLoweringTester(), language_mode_(language_mode) { |
379 int i = 0; | 379 int i = 0; |
380 set(i++, javascript.BitwiseOr(language_mode_), true); | 380 set(i++, javascript.BitwiseOr(language_mode_), true); |
381 set(i++, machine.Word32Or(), true); | 381 set(i++, simplified.NumberBitwiseOr(), true); |
382 set(i++, javascript.BitwiseXor(language_mode_), true); | 382 set(i++, javascript.BitwiseXor(language_mode_), true); |
383 set(i++, machine.Word32Xor(), true); | 383 set(i++, simplified.NumberBitwiseXor(), true); |
384 set(i++, javascript.BitwiseAnd(language_mode_), true); | 384 set(i++, javascript.BitwiseAnd(language_mode_), true); |
385 set(i++, machine.Word32And(), true); | 385 set(i++, simplified.NumberBitwiseAnd(), true); |
386 } | 386 } |
387 static const int kNumberOps = 6; | 387 static const int kNumberOps = 6; |
388 const Operator* ops[kNumberOps]; | 388 const Operator* ops[kNumberOps]; |
389 bool signedness[kNumberOps]; | 389 bool signedness[kNumberOps]; |
390 | 390 |
391 private: | 391 private: |
392 LanguageMode language_mode_; | 392 LanguageMode language_mode_; |
393 void set(int idx, const Operator* op, bool s) { | 393 void set(int idx, const Operator* op, bool s) { |
394 ops[idx] = op; | 394 ops[idx] = op; |
395 signedness[idx] = s; | 395 signedness[idx] = s; |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 CHECK_EQ(p1, r->InputAt(0)); | 1252 CHECK_EQ(p1, r->InputAt(0)); |
1253 CHECK_EQ(p0, r->InputAt(1)); | 1253 CHECK_EQ(p0, r->InputAt(1)); |
1254 } else { | 1254 } else { |
1255 CHECK_EQ(p0, r->InputAt(0)); | 1255 CHECK_EQ(p0, r->InputAt(0)); |
1256 CHECK_EQ(p1, r->InputAt(1)); | 1256 CHECK_EQ(p1, r->InputAt(1)); |
1257 } | 1257 } |
1258 } | 1258 } |
1259 } | 1259 } |
1260 } | 1260 } |
1261 } | 1261 } |
OLD | NEW |