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

Side by Side Diff: test/cctest/compiler/test-run-intrinsics.cc

Issue 1680783002: [intrinsics] Kill the %_IsMinusZero intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | test/mjsunit/compiler/minus-zero.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 "test/cctest/compiler/function-tester.h" 5 #include "test/cctest/compiler/function-tester.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 T.CheckFalse(T.NewObject("([1])")); 97 T.CheckFalse(T.NewObject("([1])"));
98 T.CheckFalse(T.NewObject("({})")); 98 T.CheckFalse(T.NewObject("({})"));
99 T.CheckFalse(T.NewObject("(/x/)")); 99 T.CheckFalse(T.NewObject("(/x/)"));
100 T.CheckFalse(T.undefined()); 100 T.CheckFalse(T.undefined());
101 T.CheckFalse(T.null()); 101 T.CheckFalse(T.null());
102 T.CheckFalse(T.Val("x")); 102 T.CheckFalse(T.Val("x"));
103 T.CheckFalse(T.Val(1)); 103 T.CheckFalse(T.Val(1));
104 } 104 }
105 105
106 106
107 TEST(IsMinusZero) {
108 FunctionTester T("(function(a) { return %_IsMinusZero(a); })", flags);
109
110 T.CheckFalse(T.Val(1));
111 T.CheckFalse(T.Val(1.1));
112 T.CheckTrue(T.Val(-0.0));
113 T.CheckFalse(T.Val(-2));
114 T.CheckFalse(T.Val(-2.3));
115 T.CheckFalse(T.undefined());
116 }
117
118
119 TEST(IsRegExp) { 107 TEST(IsRegExp) {
120 FunctionTester T("(function(a) { return %_IsRegExp(a); })", flags); 108 FunctionTester T("(function(a) { return %_IsRegExp(a); })", flags);
121 109
122 T.CheckFalse(T.NewObject("new Date()")); 110 T.CheckFalse(T.NewObject("new Date()"));
123 T.CheckFalse(T.NewObject("(function() {})")); 111 T.CheckFalse(T.NewObject("(function() {})"));
124 T.CheckFalse(T.NewObject("([1])")); 112 T.CheckFalse(T.NewObject("([1])"));
125 T.CheckFalse(T.NewObject("({})")); 113 T.CheckFalse(T.NewObject("({})"));
126 T.CheckTrue(T.NewObject("(/x/)")); 114 T.CheckTrue(T.NewObject("(/x/)"));
127 T.CheckFalse(T.undefined()); 115 T.CheckFalse(T.undefined());
128 T.CheckFalse(T.null()); 116 T.CheckFalse(T.null());
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 280
293 T.CheckCall(T.Val("a"), T.Val("a")); 281 T.CheckCall(T.Val("a"), T.Val("a"));
294 T.CheckCall(T.Val("b"), T.NewObject("(new String('b'))")); 282 T.CheckCall(T.Val("b"), T.NewObject("(new String('b'))"));
295 T.CheckCall(T.Val(123), T.Val(123)); 283 T.CheckCall(T.Val(123), T.Val(123));
296 T.CheckCall(T.Val(456), T.NewObject("(new Number(456))")); 284 T.CheckCall(T.Val(456), T.NewObject("(new Number(456))"));
297 } 285 }
298 286
299 } // namespace compiler 287 } // namespace compiler
300 } // namespace internal 288 } // namespace internal
301 } // namespace v8 289 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | test/mjsunit/compiler/minus-zero.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698