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

Side by Side Diff: test/unittests/compiler/interpreter-assembler-unittest.cc

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased and fixed. Created 5 years, 3 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/unittests/compiler/interpreter-assembler-unittest.h" 5 #include "test/unittests/compiler/interpreter-assembler-unittest.h"
6 6
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.h"
9 #include "src/unique.h" 9 #include "src/unique.h"
10 #include "test/unittests/compiler/compiler-test-utils.h" 10 #include "test/unittests/compiler/compiler-test-utils.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 InterpreterAssemblerForTest m(this, bytecode); 147 InterpreterAssemblerForTest m(this, bytecode);
148 m.Return(); 148 m.Return();
149 Graph* graph = m.GetCompletedGraph(); 149 Graph* graph = m.GetCompletedGraph();
150 150
151 Node* end = graph->end(); 151 Node* end = graph->end();
152 EXPECT_EQ(1, end->InputCount()); 152 EXPECT_EQ(1, end->InputCount());
153 Node* tail_call_node = end->InputAt(0); 153 Node* tail_call_node = end->InputAt(0);
154 154
155 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind()); 155 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind());
156 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots); 156 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots);
157 Matcher<Unique<HeapObject>> exit_trampoline( 157 Handle<HeapObject> exit_trampoline =
158 Unique<HeapObject>::CreateImmovable( 158 isolate()->builtins()->InterpreterExitTrampoline();
159 isolate()->builtins()->InterpreterExitTrampoline()));
160 EXPECT_THAT( 159 EXPECT_THAT(
161 tail_call_node, 160 tail_call_node,
162 IsTailCall(m.call_descriptor(), IsHeapConstant(exit_trampoline), 161 IsTailCall(m.call_descriptor(), IsHeapConstant(exit_trampoline),
163 IsParameter(Linkage::kInterpreterAccumulatorParameter), 162 IsParameter(Linkage::kInterpreterAccumulatorParameter),
164 IsParameter(Linkage::kInterpreterRegisterFileParameter), 163 IsParameter(Linkage::kInterpreterRegisterFileParameter),
165 IsParameter(Linkage::kInterpreterBytecodeOffsetParameter), 164 IsParameter(Linkage::kInterpreterBytecodeOffsetParameter),
166 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), 165 IsParameter(Linkage::kInterpreterBytecodeArrayParameter),
167 IsParameter(Linkage::kInterpreterDispatchTableParameter), 166 IsParameter(Linkage::kInterpreterDispatchTableParameter),
168 IsParameter(Linkage::kInterpreterContextParameter), 167 IsParameter(Linkage::kInterpreterContextParameter),
169 graph->start(), graph->start())); 168 graph->start(), graph->start()));
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 m.CallJSBuiltin(Context::SUB_BUILTIN_INDEX, receiver, arg1); 347 m.CallJSBuiltin(Context::SUB_BUILTIN_INDEX, receiver, arg1);
349 EXPECT_THAT(call_js_builtin_1, 348 EXPECT_THAT(call_js_builtin_1,
350 IsCall(_, function_matcher, receiver, arg1, context_matcher, 349 IsCall(_, function_matcher, receiver, arg1, context_matcher,
351 m.graph()->start(), m.graph()->start())); 350 m.graph()->start(), m.graph()->start()));
352 } 351 }
353 } 352 }
354 353
355 } // namespace compiler 354 } // namespace compiler
356 } // namespace internal 355 } // namespace internal
357 } // namespace v8 356 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/graph-unittest.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698