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

Side by Side Diff: test/cctest/compiler/test-js-constant-cache.cc

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/node-properties-inl.h" 9 #include "src/compiler/node-properties-inl.h"
10 #include "src/compiler/typer.h" 10 #include "src/compiler/typer.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // Old or new, it should be in the cached set afterwards. 439 // Old or new, it should be in the cached set afterwards.
440 CheckGetCachedNodesContains(&T, n); 440 CheckGetCachedNodesContains(&T, n);
441 } 441 }
442 } 442 }
443 443
444 444
445 TEST(JSGraph_GetCachedNodes_together) { 445 TEST(JSGraph_GetCachedNodes_together) {
446 JSConstantCacheTester T; 446 JSConstantCacheTester T;
447 447
448 Node* constants[] = { 448 Node* constants[] = {
449 T.TrueConstant(), T.UndefinedConstant(), T.TheHoleConstant(), 449 T.TrueConstant(),
450 T.TrueConstant(), T.FalseConstant(), T.NullConstant(), T.ZeroConstant(), 450 T.UndefinedConstant(),
451 T.OneConstant(), T.NaNConstant(), T.Int32Constant(0), T.Int32Constant(1), 451 T.TheHoleConstant(),
452 T.Int64Constant(-2), T.Int64Constant(-4), T.Float64Constant(0.9), 452 T.TrueConstant(),
453 T.Float64Constant(std::numeric_limits<double>::infinity()), 453 T.FalseConstant(),
454 T.Constant(0.99), T.Constant(1.11), 454 T.NullConstant(),
455 T.ZeroConstant(),
456 T.OneConstant(),
457 T.NaNConstant(),
458 T.Int32Constant(0),
459 T.Int32Constant(1),
460 T.Int64Constant(-2),
461 T.Int64Constant(-4),
462 T.Float64Constant(0.9),
463 T.Float64Constant(V8_INFINITY),
464 T.Constant(0.99),
465 T.Constant(1.11),
455 T.ExternalConstant(ExternalReference::address_of_one_half())}; 466 T.ExternalConstant(ExternalReference::address_of_one_half())};
456 467
457 NodeVector nodes(T.main_zone()); 468 NodeVector nodes(T.main_zone());
458 T.GetCachedNodes(&nodes); 469 T.GetCachedNodes(&nodes);
459 470
460 for (size_t i = 0; i < arraysize(constants); i++) { 471 for (size_t i = 0; i < arraysize(constants); i++) {
461 CHECK(Contains(&nodes, constants[i])); 472 CHECK(Contains(&nodes, constants[i]));
462 } 473 }
463 } 474 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-branch-combine.cc ('k') | test/cctest/compiler/test-machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698