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

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

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 years, 10 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
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.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/typer.h" 10 #include "src/compiler/typer.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 CHECK(t->Is(Type::MinusZero())); 96 CHECK(t->Is(Type::MinusZero()));
97 CHECK(!t->Is(Type::Integral32())); 97 CHECK(!t->Is(Type::Integral32()));
98 CHECK(!t->Is(Type::Signed32())); 98 CHECK(!t->Is(Type::Signed32()));
99 CHECK(!t->Is(Type::Unsigned32())); 99 CHECK(!t->Is(Type::Unsigned32()));
100 CHECK(!t->Is(Type::SignedSmall())); 100 CHECK(!t->Is(Type::SignedSmall()));
101 CHECK(!t->Is(Type::UnsignedSmall())); 101 CHECK(!t->Is(Type::UnsignedSmall()));
102 102
103 double zero_value = OpParameter<double>(zero); 103 double zero_value = OpParameter<double>(zero);
104 double minus_zero_value = OpParameter<double>(minus_zero); 104 double minus_zero_value = OpParameter<double>(minus_zero);
105 105
106 CHECK_EQ(0.0, zero_value); 106 CHECK(bit_cast<uint64_t>(0.0) == bit_cast<uint64_t>(zero_value));
107 CHECK_NE(-0.0, zero_value); 107 CHECK(bit_cast<uint64_t>(-0.0) != bit_cast<uint64_t>(zero_value));
108 CHECK_EQ(-0.0, minus_zero_value); 108 CHECK(bit_cast<uint64_t>(0.0) != bit_cast<uint64_t>(minus_zero_value));
109 CHECK_NE(0.0, minus_zero_value); 109 CHECK(bit_cast<uint64_t>(-0.0) == bit_cast<uint64_t>(minus_zero_value));
110 } 110 }
111 111
112 112
113 TEST(ZeroConstant2) { 113 TEST(ZeroConstant2) {
114 JSConstantCacheTester T; 114 JSConstantCacheTester T;
115 115
116 Node* zero = T.Constant(0); 116 Node* zero = T.Constant(0);
117 117
118 CHECK_EQ(IrOpcode::kNumberConstant, zero->opcode()); 118 CHECK_EQ(IrOpcode::kNumberConstant, zero->opcode());
119 CHECK_EQ(zero, T.ZeroConstant()); 119 CHECK_EQ(zero, T.ZeroConstant());
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 T.Constant(1.11), 465 T.Constant(1.11),
466 T.ExternalConstant(ExternalReference::address_of_one_half())}; 466 T.ExternalConstant(ExternalReference::address_of_one_half())};
467 467
468 NodeVector nodes(T.main_zone()); 468 NodeVector nodes(T.main_zone());
469 T.GetCachedNodes(&nodes); 469 T.GetCachedNodes(&nodes);
470 470
471 for (size_t i = 0; i < arraysize(constants); i++) { 471 for (size_t i = 0; i < arraysize(constants); i++) {
472 CHECK(Contains(&nodes, constants[i])); 472 CHECK(Contains(&nodes, constants[i]));
473 } 473 }
474 } 474 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-instruction.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698