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

Side by Side Diff: test/cctest/compiler/test-codegen-deopt.cc

Issue 727373002: [turbofan] add ForTesting to pipeline entry points that are for testing only. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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
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 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/compiler/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 graph = new (scope_->main_zone()) Graph(scope_->main_zone()); 56 graph = new (scope_->main_zone()) Graph(scope_->main_zone());
57 } 57 }
58 58
59 virtual ~DeoptCodegenTester() {} 59 virtual ~DeoptCodegenTester() {}
60 60
61 void GenerateCodeFromSchedule(Schedule* schedule) { 61 void GenerateCodeFromSchedule(Schedule* schedule) {
62 OFStream os(stdout); 62 OFStream os(stdout);
63 if (FLAG_trace_turbo) { 63 if (FLAG_trace_turbo) {
64 os << *schedule; 64 os << *schedule;
65 } 65 }
66 66 result_code = Pipeline::GenerateCodeForTesting(&info, graph, schedule);
67 Linkage* linkage = new (scope_->main_zone()) Linkage(info.zone(), &info);
68 Pipeline pipeline(&info);
69 result_code =
70 pipeline.GenerateCodeForMachineGraph(linkage, graph, schedule);
71
72 #ifdef OBJECT_PRINT 67 #ifdef OBJECT_PRINT
73 if (FLAG_print_opt_code || FLAG_trace_turbo) { 68 if (FLAG_print_opt_code || FLAG_trace_turbo) {
74 result_code->Print(); 69 result_code->Print();
75 } 70 }
76 #endif 71 #endif
77 } 72 }
78 73
79 Zone* zone() { return scope_->main_zone(); } 74 Zone* zone() { return scope_->main_zone(); }
80 75
81 HandleAndZoneScope* scope_; 76 HandleAndZoneScope* scope_;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 Handle<Object> result; 283 Handle<Object> result;
289 bool has_pending_exception = 284 bool has_pending_exception =
290 !Execution::Call(isolate, t.function, 285 !Execution::Call(isolate, t.function,
291 isolate->factory()->undefined_value(), 0, NULL, 286 isolate->factory()->undefined_value(), 0, NULL,
292 false).ToHandle(&result); 287 false).ToHandle(&result);
293 CHECK(!has_pending_exception); 288 CHECK(!has_pending_exception);
294 CHECK(result->SameValue(Smi::FromInt(42))); 289 CHECK(result->SameValue(Smi::FromInt(42)));
295 } 290 }
296 291
297 #endif 292 #endif
OLDNEW
« no previous file with comments | « test/cctest/compiler/graph-builder-tester.cc ('k') | test/unittests/compiler/register-allocator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698