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

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

Issue 694313002: [turbofan] add RegisterConfiguration to decouple arch specific register layouts from compiler (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
« no previous file with comments | « src/compiler/register-configuration.cc ('k') | test/cctest/compiler/test-gap-resolver.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 #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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Linkage* linkage = new (scope_->main_zone()) Linkage(info.zone(), &info); 68 Linkage* linkage = new (scope_->main_zone()) Linkage(info.zone(), &info);
69 InstructionBlocks* instruction_blocks = 69 InstructionBlocks* instruction_blocks =
70 TestInstrSeq::InstructionBlocksFor(scope_->main_zone(), schedule); 70 TestInstrSeq::InstructionBlocksFor(scope_->main_zone(), schedule);
71 code = new TestInstrSeq(scope_->main_zone(), instruction_blocks); 71 code = new TestInstrSeq(scope_->main_zone(), instruction_blocks);
72 SourcePositionTable source_positions(graph); 72 SourcePositionTable source_positions(graph);
73 InstructionSelector selector(scope_->main_zone(), graph, linkage, code, 73 InstructionSelector selector(scope_->main_zone(), graph, linkage, code,
74 schedule, &source_positions); 74 schedule, &source_positions);
75 selector.SelectInstructions(); 75 selector.SelectInstructions();
76 76
77 if (FLAG_trace_turbo) { 77 if (FLAG_trace_turbo) {
78 PrintableInstructionSequence printable = {
79 RegisterConfiguration::ArchDefault(), code};
78 os << "----- Instruction sequence before register allocation -----\n" 80 os << "----- Instruction sequence before register allocation -----\n"
79 << *code; 81 << printable;
80 } 82 }
81 83
82 Frame frame; 84 Frame frame;
83 RegisterAllocator allocator(RegisterAllocator::PlatformConfig(), 85 RegisterAllocator allocator(RegisterConfiguration::ArchDefault(),
84 scope_->main_zone(), &frame, code); 86 scope_->main_zone(), &frame, code);
85 CHECK(allocator.Allocate()); 87 CHECK(allocator.Allocate());
86 88
87 if (FLAG_trace_turbo) { 89 if (FLAG_trace_turbo) {
90 PrintableInstructionSequence printable = {
91 RegisterConfiguration::ArchDefault(), code};
88 os << "----- Instruction sequence after register allocation -----\n" 92 os << "----- Instruction sequence after register allocation -----\n"
89 << *code; 93 << printable;
90 } 94 }
91 95
92 compiler::CodeGenerator generator(&frame, linkage, code, &info); 96 compiler::CodeGenerator generator(&frame, linkage, code, &info);
93 result_code = generator.GenerateCode(); 97 result_code = generator.GenerateCode();
94 98
95 #ifdef OBJECT_PRINT 99 #ifdef OBJECT_PRINT
96 if (FLAG_print_opt_code || FLAG_trace_turbo) { 100 if (FLAG_print_opt_code || FLAG_trace_turbo) {
97 result_code->Print(); 101 result_code->Print();
98 } 102 }
99 #endif 103 #endif
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 Handle<Object> result; 315 Handle<Object> result;
312 bool has_pending_exception = 316 bool has_pending_exception =
313 !Execution::Call(isolate, t.function, 317 !Execution::Call(isolate, t.function,
314 isolate->factory()->undefined_value(), 0, NULL, 318 isolate->factory()->undefined_value(), 0, NULL,
315 false).ToHandle(&result); 319 false).ToHandle(&result);
316 CHECK(!has_pending_exception); 320 CHECK(!has_pending_exception);
317 CHECK(result->SameValue(Smi::FromInt(42))); 321 CHECK(result->SameValue(Smi::FromInt(42)));
318 } 322 }
319 323
320 #endif 324 #endif
OLDNEW
« no previous file with comments | « src/compiler/register-configuration.cc ('k') | test/cctest/compiler/test-gap-resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698