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 <string> | 5 #include <string> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
9 | 9 |
10 #include "src/base/utils/random-number-generator.h" | 10 #include "src/base/utils/random-number-generator.h" |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // Prepare for expression. | 417 // Prepare for expression. |
418 m_.If(); | 418 m_.If(); |
419 c_.If(); | 419 c_.If(); |
420 int depth = 0; | 420 int depth = 0; |
421 for (; it != end; ++it) { | 421 for (; it != end; ++it) { |
422 switch (*it) { | 422 switch (*it) { |
423 case 'v': | 423 case 'v': |
424 m_.IfNode(); | 424 m_.IfNode(); |
425 { | 425 { |
426 Node* offset = Int32Constant(offset_ * 4); | 426 Node* offset = Int32Constant(offset_ * 4); |
427 Store(kMachineWord32, Parameter(1), offset, var_.Get()); | 427 Store(kMachInt32, Parameter(1), offset, var_.Get()); |
428 var_.Set(Int32Add(var_.Get(), Int32Constant(kIfInc))); | 428 var_.Set(Int32Add(var_.Get(), Int32Constant(kIfInc))); |
429 c_.If(Load(kMachineWord32, Parameter(0), offset)); | 429 c_.If(Load(kMachInt32, Parameter(0), offset)); |
430 offset_++; | 430 offset_++; |
431 } | 431 } |
432 break; | 432 break; |
433 case '&': | 433 case '&': |
434 m_.And(); | 434 m_.And(); |
435 c_.And(); | 435 c_.And(); |
436 var_.Set(Int32Add(var_.Get(), Int32Constant(kConjunctionInc))); | 436 var_.Set(Int32Add(var_.Get(), Int32Constant(kConjunctionInc))); |
437 break; | 437 break; |
438 case '|': | 438 case '|': |
439 m_.Or(); | 439 m_.Or(); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 for (int i = 0; i < n_ifs * n_vars + 10; i++) { | 658 for (int i = 0; i < n_ifs * n_vars + 10; i++) { |
659 IfBuilderGenerator m; | 659 IfBuilderGenerator m; |
660 m.ParseRandomIfThenElse(&rng, n_ifs, n_vars); | 660 m.ParseRandomIfThenElse(&rng, n_ifs, n_vars); |
661 m.RunRandom(&rng); | 661 m.RunRandom(&rng); |
662 } | 662 } |
663 } | 663 } |
664 } | 664 } |
665 } | 665 } |
666 | 666 |
667 #endif | 667 #endif |
OLD | NEW |