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

Side by Side Diff: test/cctest/compiler/test-js-context-specialization.cc

Issue 714613002: Fix bugs in simplified lowering relating to int32/uint32 signs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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
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/compiler/js-context-specialization.h" 5 #include "src/compiler/js-context-specialization.h"
6 #include "src/compiler/js-operator.h" 6 #include "src/compiler/js-operator.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties-inl.h" 8 #include "src/compiler/node-properties-inl.h"
9 #include "src/compiler/source-position.h" 9 #include "src/compiler/source-position.h"
10 #include "test/cctest/cctest.h" 10 #include "test/cctest/cctest.h"
11 #include "test/cctest/compiler/function-tester.h" 11 #include "test/cctest/compiler/function-tester.h"
12 #include "test/cctest/compiler/graph-builder-tester.h" 12 #include "test/cctest/compiler/graph-builder-tester.h"
13 13
14 using namespace v8::internal; 14 using namespace v8::internal;
15 using namespace v8::internal::compiler; 15 using namespace v8::internal::compiler;
16 16
17 class ContextSpecializationTester : public HandleAndZoneScope, 17 class ContextSpecializationTester : public HandleAndZoneScope,
18 public DirectGraphBuilder { 18 public DirectGraphBuilder {
19 public: 19 public:
20 ContextSpecializationTester() 20 ContextSpecializationTester()
21 : DirectGraphBuilder(new (main_zone()) Graph(main_zone())), 21 : DirectGraphBuilder(new (main_zone()) Graph(main_zone())),
22 common_(main_zone()), 22 common_(main_zone()),
23 javascript_(main_zone()), 23 javascript_(main_zone()),
24 machine_(), 24 machine_(main_zone()),
25 simplified_(main_zone()), 25 simplified_(main_zone()),
26 jsgraph_(graph(), common(), &javascript_, &machine_), 26 jsgraph_(graph(), common(), &javascript_, &machine_),
27 info_(main_isolate(), main_zone()) {} 27 info_(main_isolate(), main_zone()) {}
28 28
29 Factory* factory() { return main_isolate()->factory(); } 29 Factory* factory() { return main_isolate()->factory(); }
30 CommonOperatorBuilder* common() { return &common_; } 30 CommonOperatorBuilder* common() { return &common_; }
31 JSOperatorBuilder* javascript() { return &javascript_; } 31 JSOperatorBuilder* javascript() { return &javascript_; }
32 SimplifiedOperatorBuilder* simplified() { return &simplified_; } 32 SimplifiedOperatorBuilder* simplified() { return &simplified_; }
33 JSGraph* jsgraph() { return &jsgraph_; } 33 JSGraph* jsgraph() { return &jsgraph_; }
34 CompilationInfo* info() { return &info_; } 34 CompilationInfo* info() { return &info_; }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 { 295 {
296 FunctionTester T( 296 FunctionTester T(
297 "(function() { if (false) { var x = 1; } function inc(a)" 297 "(function() { if (false) { var x = 1; } function inc(a)"
298 " { return a + x; } return inc; })()"); // x is undefined! 298 " { return a + x; } return inc; })()"); // x is undefined!
299 299
300 CHECK(T.Call(T.Val(0.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); 300 CHECK(T.Call(T.Val(0.0), T.Val(0.0)).ToHandleChecked()->IsNaN());
301 CHECK(T.Call(T.Val(2.0), T.Val(0.0)).ToHandleChecked()->IsNaN()); 301 CHECK(T.Call(T.Val(2.0), T.Val(0.0)).ToHandleChecked()->IsNaN());
302 CHECK(T.Call(T.Val(-2.1), T.Val(0.0)).ToHandleChecked()->IsNaN()); 302 CHECK(T.Call(T.Val(-2.1), T.Val(0.0)).ToHandleChecked()->IsNaN());
303 } 303 }
304 } 304 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-js-constant-cache.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