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

Side by Side Diff: test/cctest/compiler/test-typer.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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 | « test/cctest/compiler/test-simplified-lowering.cc ('k') | test/cctest/test-ast.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 <functional> 5 #include <functional>
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.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"
11 #include "test/cctest/cctest.h" 11 #include "test/cctest/cctest.h"
12 #include "test/cctest/compiler/graph-builder-tester.h" 12 #include "test/cctest/compiler/graph-builder-tester.h"
13 #include "test/cctest/types-fuzz.h" 13 #include "test/cctest/types-fuzz.h"
14 14
15 using namespace v8::internal; 15 using namespace v8::internal;
16 using namespace v8::internal::compiler; 16 using namespace v8::internal::compiler;
17 17
18 18
19 // TODO(titzer): generate a large set of deterministic inputs for these tests. 19 // TODO(titzer): generate a large set of deterministic inputs for these tests.
20 class TyperTester : public HandleAndZoneScope, public GraphAndBuilders { 20 class TyperTester : public HandleAndZoneScope, public GraphAndBuilders {
21 public: 21 public:
22 TyperTester() 22 TyperTester()
23 : GraphAndBuilders(main_zone()), 23 : GraphAndBuilders(main_zone()),
24 types_(main_zone(), isolate()), 24 types_(main_zone(), isolate()),
25 typer_(graph(), MaybeHandle<Context>()), 25 typer_(isolate(), graph(), MaybeHandle<Context>()),
26 javascript_(main_zone()) { 26 javascript_(main_zone()) {
27 Node* s = graph()->NewNode(common()->Start(3)); 27 Node* s = graph()->NewNode(common()->Start(3));
28 graph()->SetStart(s); 28 graph()->SetStart(s);
29 context_node_ = graph()->NewNode(common()->Parameter(2), graph()->start()); 29 context_node_ = graph()->NewNode(common()->Parameter(2), graph()->start());
30 rng_ = isolate()->random_number_generator(); 30 rng_ = isolate()->random_number_generator();
31 31
32 integers.push_back(0); 32 integers.push_back(0);
33 integers.push_back(0); 33 integers.push_back(0);
34 integers.push_back(-1); 34 integers.push_back(-1);
35 integers.push_back(+1); 35 integers.push_back(+1);
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 V(Modulus) 371 V(Modulus)
372 372
373 373
374 #define TEST_FUNC(name) \ 374 #define TEST_FUNC(name) \
375 TEST(Monotonicity_##name) { \ 375 TEST(Monotonicity_##name) { \
376 TyperTester t; \ 376 TyperTester t; \
377 t.TestBinaryMonotonicity(t.javascript_.name()); \ 377 t.TestBinaryMonotonicity(t.javascript_.name()); \
378 } 378 }
379 JSBINOP_LIST(TEST_FUNC) 379 JSBINOP_LIST(TEST_FUNC)
380 #undef TEST_FUNC 380 #undef TEST_FUNC
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-simplified-lowering.cc ('k') | test/cctest/test-ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698