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

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

Issue 618803003: Refine expression typing, esp. by propagating range information. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « test/cctest/cctest.gyp ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/node-properties-inl.h" 8 #include "src/compiler/node-properties-inl.h"
9 #include "src/compiler/typer.h" 9 #include "src/compiler/typer.h"
10 #include "src/types.h" 10 #include "src/types.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 } 221 }
222 222
223 223
224 TEST(NumberTypes) { 224 TEST(NumberTypes) {
225 JSConstantCacheTester T; 225 JSConstantCacheTester T;
226 226
227 FOR_FLOAT64_INPUTS(i) { 227 FOR_FLOAT64_INPUTS(i) {
228 double value = *i; 228 double value = *i;
229 Node* node = T.Constant(value); 229 Node* node = T.Constant(value);
230 CHECK(T.upper(node)->Equals(Type::Of(value, T.main_zone()))); 230 CHECK(T.upper(node)->Is(Type::Of(value, T.main_zone())));
231 } 231 }
232 } 232 }
233 233
234 234
235 TEST(HeapNumbers) { 235 TEST(HeapNumbers) {
236 JSConstantCacheTester T; 236 JSConstantCacheTester T;
237 237
238 FOR_FLOAT64_INPUTS(i) { 238 FOR_FLOAT64_INPUTS(i) {
239 double value = *i; 239 double value = *i;
240 Handle<Object> num = T.factory()->NewNumber(value); 240 Handle<Object> num = T.factory()->NewNumber(value);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 CHECK(T.upper(T.NullConstant())->Is(Type::Null())); 282 CHECK(T.upper(T.NullConstant())->Is(Type::Null()));
283 CHECK(T.upper(T.ZeroConstant())->Is(Type::Number())); 283 CHECK(T.upper(T.ZeroConstant())->Is(Type::Number()));
284 CHECK(T.upper(T.OneConstant())->Is(Type::Number())); 284 CHECK(T.upper(T.OneConstant())->Is(Type::Number()));
285 CHECK(T.upper(T.NaNConstant())->Is(Type::NaN())); 285 CHECK(T.upper(T.NaNConstant())->Is(Type::NaN()));
286 } 286 }
287 287
288 288
289 TEST(ExternalReferences) { 289 TEST(ExternalReferences) {
290 // TODO(titzer): test canonicalization of external references. 290 // TODO(titzer): test canonicalization of external references.
291 } 291 }
OLDNEW
« no previous file with comments | « test/cctest/cctest.gyp ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698