Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Side by Side Diff: test/cctest/compiler/test-representation-change.cc

Issue 640603003: [turbofan] Properly emit bounds checks for typed array element loads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add another test. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | test/mjsunit/asm/float32array-outofbounds.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <limits> 5 #include <limits>
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 #include "test/cctest/compiler/graph-builder-tester.h" 9 #include "test/cctest/compiler/graph-builder-tester.h"
10 #include "test/cctest/compiler/value-helper.h" 10 #include "test/cctest/compiler/value-helper.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 // Int32,Uint32 <-> Float64 are actually machine conversions. 422 // Int32,Uint32 <-> Float64 are actually machine conversions.
423 CheckChange(IrOpcode::kChangeInt32ToFloat64, kRepWord32 | kTypeInt32, 423 CheckChange(IrOpcode::kChangeInt32ToFloat64, kRepWord32 | kTypeInt32,
424 kRepFloat64); 424 kRepFloat64);
425 CheckChange(IrOpcode::kChangeUint32ToFloat64, kRepWord32 | kTypeUint32, 425 CheckChange(IrOpcode::kChangeUint32ToFloat64, kRepWord32 | kTypeUint32,
426 kRepFloat64); 426 kRepFloat64);
427 CheckChange(IrOpcode::kChangeFloat64ToInt32, kRepFloat64 | kTypeInt32, 427 CheckChange(IrOpcode::kChangeFloat64ToInt32, kRepFloat64 | kTypeInt32,
428 kRepWord32); 428 kRepWord32);
429 CheckChange(IrOpcode::kChangeFloat64ToUint32, kRepFloat64 | kTypeUint32, 429 CheckChange(IrOpcode::kChangeFloat64ToUint32, kRepFloat64 | kTypeUint32,
430 kRepWord32); 430 kRepWord32);
431 431
432 CheckChange(IrOpcode::kTruncateFloat64ToFloat32, kRepFloat64, kRepFloat32);
433
432 // Int32,Uint32 <-> Float32 require two changes. 434 // Int32,Uint32 <-> Float32 require two changes.
433 CheckTwoChanges(IrOpcode::kChangeInt32ToFloat64, 435 CheckTwoChanges(IrOpcode::kChangeInt32ToFloat64,
434 IrOpcode::kTruncateFloat64ToFloat32, kRepWord32 | kTypeInt32, 436 IrOpcode::kTruncateFloat64ToFloat32, kRepWord32 | kTypeInt32,
435 kRepFloat32); 437 kRepFloat32);
436 CheckTwoChanges(IrOpcode::kChangeUint32ToFloat64, 438 CheckTwoChanges(IrOpcode::kChangeUint32ToFloat64,
437 IrOpcode::kTruncateFloat64ToFloat32, kRepWord32 | kTypeUint32, 439 IrOpcode::kTruncateFloat64ToFloat32, kRepWord32 | kTypeUint32,
438 kRepFloat32); 440 kRepFloat32);
439 CheckTwoChanges(IrOpcode::kChangeFloat32ToFloat64, 441 CheckTwoChanges(IrOpcode::kChangeFloat32ToFloat64,
440 IrOpcode::kChangeFloat64ToInt32, kRepFloat32 | kTypeInt32, 442 IrOpcode::kChangeFloat64ToInt32, kRepFloat32 | kTypeInt32,
441 kRepWord32); 443 kRepWord32);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 r.CheckTypeError(kRepWord32 | kTypeUint32, kRepWord64); 542 r.CheckTypeError(kRepWord32 | kTypeUint32, kRepWord64);
541 543
542 for (size_t i = 0; i < arraysize(all_reps); i++) { 544 for (size_t i = 0; i < arraysize(all_reps); i++) {
543 for (size_t j = 0; j < arraysize(all_reps); j++) { 545 for (size_t j = 0; j < arraysize(all_reps); j++) {
544 if (i == j) continue; 546 if (i == j) continue;
545 // Only a single from representation is allowed. 547 // Only a single from representation is allowed.
546 r.CheckTypeError(all_reps[i] | all_reps[j], kRepTagged); 548 r.CheckTypeError(all_reps[i] | all_reps[j], kRepTagged);
547 } 549 }
548 } 550 }
549 } 551 }
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | test/mjsunit/asm/float32array-outofbounds.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698