OLD | NEW |
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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
10 #include "src/interface-descriptors.h" | 10 #include "src/interface-descriptors.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsStore( | 77 Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsStore( |
78 const Matcher<StoreRepresentation>& rep_matcher, | 78 const Matcher<StoreRepresentation>& rep_matcher, |
79 const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher, | 79 const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher, |
80 const Matcher<Node*>& value_matcher) { | 80 const Matcher<Node*>& value_matcher) { |
81 return ::i::compiler::IsStore(rep_matcher, base_matcher, index_matcher, | 81 return ::i::compiler::IsStore(rep_matcher, base_matcher, index_matcher, |
82 value_matcher, graph()->start(), | 82 value_matcher, graph()->start(), |
83 graph()->start()); | 83 graph()->start()); |
84 } | 84 } |
85 | 85 |
86 | 86 |
87 template <class... A> | |
88 Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsCall( | |
89 const Matcher<const CallDescriptor*>& descriptor_matcher, A... args) { | |
90 return ::i::compiler::IsCall(descriptor_matcher, args..., graph()->start(), | |
91 graph()->start()); | |
92 } | |
93 | |
94 | |
95 Matcher<Node*> | 87 Matcher<Node*> |
96 InterpreterAssemblerTest::InterpreterAssemblerForTest::IsBytecodeOperand( | 88 InterpreterAssemblerTest::InterpreterAssemblerForTest::IsBytecodeOperand( |
97 int offset) { | 89 int offset) { |
98 return IsLoad( | 90 return IsLoad( |
99 kMachUint8, IsParameter(Linkage::kInterpreterBytecodeArrayParameter), | 91 kMachUint8, IsParameter(Linkage::kInterpreterBytecodeArrayParameter), |
100 IsIntPtrAdd(IsParameter(Linkage::kInterpreterBytecodeOffsetParameter), | 92 IsIntPtrAdd(IsParameter(Linkage::kInterpreterBytecodeOffsetParameter), |
101 IsInt32Constant(offset))); | 93 IsInt32Constant(offset))); |
102 } | 94 } |
103 | 95 |
104 | 96 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind()); | 161 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind()); |
170 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots); | 162 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots); |
171 EXPECT_THAT( | 163 EXPECT_THAT( |
172 tail_call_node, | 164 tail_call_node, |
173 IsTailCall(m.call_descriptor(), code_target_matcher, | 165 IsTailCall(m.call_descriptor(), code_target_matcher, |
174 IsParameter(Linkage::kInterpreterAccumulatorParameter), | 166 IsParameter(Linkage::kInterpreterAccumulatorParameter), |
175 IsParameter(Linkage::kInterpreterRegisterFileParameter), | 167 IsParameter(Linkage::kInterpreterRegisterFileParameter), |
176 next_bytecode_offset_matcher, | 168 next_bytecode_offset_matcher, |
177 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), | 169 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), |
178 IsParameter(Linkage::kInterpreterDispatchTableParameter), | 170 IsParameter(Linkage::kInterpreterDispatchTableParameter), |
179 IsParameter(Linkage::kInterpreterContextParameter), | 171 IsParameter(Linkage::kInterpreterContextParameter), _, _)); |
180 graph->start(), graph->start())); | |
181 } | 172 } |
182 } | 173 } |
183 | 174 |
184 | 175 |
185 TARGET_TEST_F(InterpreterAssemblerTest, Jump) { | 176 TARGET_TEST_F(InterpreterAssemblerTest, Jump) { |
186 int jump_offsets[] = {-9710, -77, 0, +3, +97109}; | 177 int jump_offsets[] = {-9710, -77, 0, +3, +97109}; |
187 TRACED_FOREACH(int, jump_offset, jump_offsets) { | 178 TRACED_FOREACH(int, jump_offset, jump_offsets) { |
188 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 179 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
189 InterpreterAssemblerForTest m(this, bytecode); | 180 InterpreterAssemblerForTest m(this, bytecode); |
190 m.Jump(m.Int32Constant(jump_offset)); | 181 m.Jump(m.Int32Constant(jump_offset)); |
(...skipping 16 matching lines...) Expand all Loading... |
207 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind()); | 198 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind()); |
208 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots); | 199 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots); |
209 EXPECT_THAT( | 200 EXPECT_THAT( |
210 tail_call_node, | 201 tail_call_node, |
211 IsTailCall(m.call_descriptor(), code_target_matcher, | 202 IsTailCall(m.call_descriptor(), code_target_matcher, |
212 IsParameter(Linkage::kInterpreterAccumulatorParameter), | 203 IsParameter(Linkage::kInterpreterAccumulatorParameter), |
213 IsParameter(Linkage::kInterpreterRegisterFileParameter), | 204 IsParameter(Linkage::kInterpreterRegisterFileParameter), |
214 next_bytecode_offset_matcher, | 205 next_bytecode_offset_matcher, |
215 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), | 206 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), |
216 IsParameter(Linkage::kInterpreterDispatchTableParameter), | 207 IsParameter(Linkage::kInterpreterDispatchTableParameter), |
217 IsParameter(Linkage::kInterpreterContextParameter), | 208 IsParameter(Linkage::kInterpreterContextParameter), _, _)); |
218 graph->start(), graph->start())); | |
219 } | 209 } |
220 } | 210 } |
221 } | 211 } |
222 | 212 |
223 | 213 |
224 TARGET_TEST_F(InterpreterAssemblerTest, JumpIfWordEqual) { | 214 TARGET_TEST_F(InterpreterAssemblerTest, JumpIfWordEqual) { |
225 static const int kJumpIfTrueOffset = 73; | 215 static const int kJumpIfTrueOffset = 73; |
226 | 216 |
227 MachineOperatorBuilder machine(zone()); | 217 MachineOperatorBuilder machine(zone()); |
228 | 218 |
(...skipping 20 matching lines...) Expand all Loading... |
249 IsWord32Shl(target_bytecode_matcher, | 239 IsWord32Shl(target_bytecode_matcher, |
250 IsInt32Constant(kPointerSizeLog2))); | 240 IsInt32Constant(kPointerSizeLog2))); |
251 EXPECT_THAT( | 241 EXPECT_THAT( |
252 end->InputAt(i), | 242 end->InputAt(i), |
253 IsTailCall(m.call_descriptor(), code_target_matcher, | 243 IsTailCall(m.call_descriptor(), code_target_matcher, |
254 IsParameter(Linkage::kInterpreterAccumulatorParameter), | 244 IsParameter(Linkage::kInterpreterAccumulatorParameter), |
255 IsParameter(Linkage::kInterpreterRegisterFileParameter), | 245 IsParameter(Linkage::kInterpreterRegisterFileParameter), |
256 next_bytecode_offset_matcher, | 246 next_bytecode_offset_matcher, |
257 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), | 247 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), |
258 IsParameter(Linkage::kInterpreterDispatchTableParameter), | 248 IsParameter(Linkage::kInterpreterDispatchTableParameter), |
259 IsParameter(Linkage::kInterpreterContextParameter), | 249 IsParameter(Linkage::kInterpreterContextParameter), _, _)); |
260 graph->start(), graph->start())); | |
261 } | 250 } |
262 | 251 |
263 // TODO(oth): test control flow paths. | 252 // TODO(oth): test control flow paths. |
264 } | 253 } |
265 } | 254 } |
266 | 255 |
267 | 256 |
268 TARGET_TEST_F(InterpreterAssemblerTest, Return) { | 257 TARGET_TEST_F(InterpreterAssemblerTest, Return) { |
269 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 258 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
270 InterpreterAssemblerForTest m(this, bytecode); | 259 InterpreterAssemblerForTest m(this, bytecode); |
271 m.Return(); | 260 m.Return(); |
272 Graph* graph = m.graph(); | 261 Graph* graph = m.graph(); |
273 | 262 |
274 Node* end = graph->end(); | 263 Node* end = graph->end(); |
275 EXPECT_EQ(1, end->InputCount()); | 264 EXPECT_EQ(1, end->InputCount()); |
276 Node* tail_call_node = end->InputAt(0); | 265 Node* tail_call_node = end->InputAt(0); |
277 | 266 |
278 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind()); | 267 EXPECT_EQ(CallDescriptor::kCallCodeObject, m.call_descriptor()->kind()); |
279 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots); | 268 EXPECT_TRUE(m.call_descriptor()->flags() & CallDescriptor::kCanUseRoots); |
280 Handle<HeapObject> exit_trampoline = | 269 Handle<HeapObject> exit_trampoline = |
281 isolate()->builtins()->InterpreterExitTrampoline(); | 270 isolate()->builtins()->InterpreterExitTrampoline(); |
282 EXPECT_THAT( | 271 EXPECT_THAT( |
283 tail_call_node, | 272 tail_call_node, |
284 IsTailCall(m.call_descriptor(), IsHeapConstant(exit_trampoline), | 273 IsTailCall(m.call_descriptor(), IsHeapConstant(exit_trampoline), |
285 IsParameter(Linkage::kInterpreterAccumulatorParameter), | 274 IsParameter(Linkage::kInterpreterAccumulatorParameter), |
286 IsParameter(Linkage::kInterpreterRegisterFileParameter), | 275 IsParameter(Linkage::kInterpreterRegisterFileParameter), |
287 IsParameter(Linkage::kInterpreterBytecodeOffsetParameter), | 276 IsParameter(Linkage::kInterpreterBytecodeOffsetParameter), |
288 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), | 277 IsParameter(Linkage::kInterpreterBytecodeArrayParameter), |
289 IsParameter(Linkage::kInterpreterDispatchTableParameter), | 278 IsParameter(Linkage::kInterpreterDispatchTableParameter), |
290 IsParameter(Linkage::kInterpreterContextParameter), | 279 IsParameter(Linkage::kInterpreterContextParameter), _, _)); |
291 graph->start(), graph->start())); | |
292 } | 280 } |
293 } | 281 } |
294 | 282 |
295 | 283 |
296 TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) { | 284 TARGET_TEST_F(InterpreterAssemblerTest, BytecodeOperand) { |
297 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 285 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
298 InterpreterAssemblerForTest m(this, bytecode); | 286 InterpreterAssemblerForTest m(this, bytecode); |
299 int number_of_operands = interpreter::Bytecodes::NumberOfOperands(bytecode); | 287 int number_of_operands = interpreter::Bytecodes::NumberOfOperands(bytecode); |
300 for (int i = 0; i < number_of_operands; i++) { | 288 for (int i = 0; i < number_of_operands; i++) { |
301 int offset = interpreter::Bytecodes::GetOperandOffset(bytecode, i); | 289 int offset = interpreter::Bytecodes::GetOperandOffset(bytecode, i); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 // Should be passed to next bytecode handler on dispatch. | 338 // Should be passed to next bytecode handler on dispatch. |
351 m.Dispatch(); | 339 m.Dispatch(); |
352 Graph* graph = m.graph(); | 340 Graph* graph = m.graph(); |
353 | 341 |
354 Node* end = graph->end(); | 342 Node* end = graph->end(); |
355 EXPECT_EQ(1, end->InputCount()); | 343 EXPECT_EQ(1, end->InputCount()); |
356 Node* tail_call_node = end->InputAt(0); | 344 Node* tail_call_node = end->InputAt(0); |
357 | 345 |
358 EXPECT_THAT(tail_call_node, | 346 EXPECT_THAT(tail_call_node, |
359 IsTailCall(m.call_descriptor(), _, accumulator_value_2, _, _, _, | 347 IsTailCall(m.call_descriptor(), _, accumulator_value_2, _, _, _, |
360 _, graph->start(), graph->start())); | 348 _, _, _)); |
361 } | 349 } |
362 } | 350 } |
363 | 351 |
364 | 352 |
365 TARGET_TEST_F(InterpreterAssemblerTest, RegisterLocation) { | 353 TARGET_TEST_F(InterpreterAssemblerTest, RegisterLocation) { |
366 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 354 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
367 InterpreterAssemblerForTest m(this, bytecode); | 355 InterpreterAssemblerForTest m(this, bytecode); |
368 Node* reg_index_node = m.Int32Constant(44); | 356 Node* reg_index_node = m.Int32Constant(44); |
369 Node* reg_location_node = m.RegisterLocation(reg_index_node); | 357 Node* reg_location_node = m.RegisterLocation(reg_index_node); |
370 EXPECT_THAT( | 358 EXPECT_THAT( |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 } | 520 } |
533 } | 521 } |
534 | 522 |
535 | 523 |
536 TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime2) { | 524 TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime2) { |
537 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 525 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
538 InterpreterAssemblerForTest m(this, bytecode); | 526 InterpreterAssemblerForTest m(this, bytecode); |
539 Node* arg1 = m.Int32Constant(2); | 527 Node* arg1 = m.Int32Constant(2); |
540 Node* arg2 = m.Int32Constant(3); | 528 Node* arg2 = m.Int32Constant(3); |
541 Node* call_runtime = m.CallRuntime(Runtime::kAdd, arg1, arg2); | 529 Node* call_runtime = m.CallRuntime(Runtime::kAdd, arg1, arg2); |
542 EXPECT_THAT(call_runtime, | 530 EXPECT_THAT( |
543 m.IsCall(_, _, arg1, arg2, _, IsInt32Constant(2), | 531 call_runtime, |
544 IsParameter(Linkage::kInterpreterContextParameter))); | 532 IsCall(_, _, arg1, arg2, _, IsInt32Constant(2), |
| 533 IsParameter(Linkage::kInterpreterContextParameter), _, _)); |
545 } | 534 } |
546 } | 535 } |
547 | 536 |
548 | 537 |
549 TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime) { | 538 TARGET_TEST_F(InterpreterAssemblerTest, CallRuntime) { |
550 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 539 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
551 InterpreterAssemblerForTest m(this, bytecode); | 540 InterpreterAssemblerForTest m(this, bytecode); |
552 Callable builtin = CodeFactory::InterpreterCEntry(isolate()); | 541 Callable builtin = CodeFactory::InterpreterCEntry(isolate()); |
553 | 542 |
554 Node* function_id = m.Int32Constant(0); | 543 Node* function_id = m.Int32Constant(0); |
555 Node* first_arg = m.Int32Constant(1); | 544 Node* first_arg = m.Int32Constant(1); |
556 Node* arg_count = m.Int32Constant(2); | 545 Node* arg_count = m.Int32Constant(2); |
557 | 546 |
558 Matcher<Node*> function_table = IsExternalConstant( | 547 Matcher<Node*> function_table = IsExternalConstant( |
559 ExternalReference::runtime_function_table_address(isolate())); | 548 ExternalReference::runtime_function_table_address(isolate())); |
560 Matcher<Node*> function = IsIntPtrAdd( | 549 Matcher<Node*> function = IsIntPtrAdd( |
561 function_table, | 550 function_table, |
562 IsInt32Mul(function_id, IsInt32Constant(sizeof(Runtime::Function)))); | 551 IsInt32Mul(function_id, IsInt32Constant(sizeof(Runtime::Function)))); |
563 Matcher<Node*> function_entry = | 552 Matcher<Node*> function_entry = |
564 m.IsLoad(kMachPtr, function, | 553 m.IsLoad(kMachPtr, function, |
565 IsInt32Constant(offsetof(Runtime::Function, entry))); | 554 IsInt32Constant(offsetof(Runtime::Function, entry))); |
566 | 555 |
567 Node* call_runtime = m.CallRuntime(function_id, first_arg, arg_count); | 556 Node* call_runtime = m.CallRuntime(function_id, first_arg, arg_count); |
568 EXPECT_THAT(call_runtime, | 557 EXPECT_THAT( |
569 m.IsCall(_, IsHeapConstant(builtin.code()), arg_count, | 558 call_runtime, |
570 first_arg, function_entry, | 559 IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg, |
571 IsParameter(Linkage::kInterpreterContextParameter))); | 560 function_entry, |
| 561 IsParameter(Linkage::kInterpreterContextParameter), _, _)); |
572 } | 562 } |
573 } | 563 } |
574 | 564 |
575 | 565 |
576 TARGET_TEST_F(InterpreterAssemblerTest, CallIC) { | 566 TARGET_TEST_F(InterpreterAssemblerTest, CallIC) { |
577 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 567 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
578 InterpreterAssemblerForTest m(this, bytecode); | 568 InterpreterAssemblerForTest m(this, bytecode); |
579 LoadWithVectorDescriptor descriptor(isolate()); | 569 LoadWithVectorDescriptor descriptor(isolate()); |
580 Node* target = m.Int32Constant(1); | 570 Node* target = m.Int32Constant(1); |
581 Node* arg1 = m.Int32Constant(2); | 571 Node* arg1 = m.Int32Constant(2); |
582 Node* arg2 = m.Int32Constant(3); | 572 Node* arg2 = m.Int32Constant(3); |
583 Node* arg3 = m.Int32Constant(4); | 573 Node* arg3 = m.Int32Constant(4); |
584 Node* arg4 = m.Int32Constant(5); | 574 Node* arg4 = m.Int32Constant(5); |
585 Node* call_ic = m.CallIC(descriptor, target, arg1, arg2, arg3, arg4); | 575 Node* call_ic = m.CallIC(descriptor, target, arg1, arg2, arg3, arg4); |
586 EXPECT_THAT(call_ic, | 576 EXPECT_THAT( |
587 m.IsCall(_, target, arg1, arg2, arg3, arg4, | 577 call_ic, |
588 IsParameter(Linkage::kInterpreterContextParameter))); | 578 IsCall(_, target, arg1, arg2, arg3, arg4, |
| 579 IsParameter(Linkage::kInterpreterContextParameter), _, _)); |
589 } | 580 } |
590 } | 581 } |
591 | 582 |
592 | 583 |
593 TARGET_TEST_F(InterpreterAssemblerTest, CallJS) { | 584 TARGET_TEST_F(InterpreterAssemblerTest, CallJS) { |
594 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 585 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
595 InterpreterAssemblerForTest m(this, bytecode); | 586 InterpreterAssemblerForTest m(this, bytecode); |
596 Callable builtin = CodeFactory::InterpreterPushArgsAndCall(isolate()); | 587 Callable builtin = CodeFactory::InterpreterPushArgsAndCall(isolate()); |
597 Node* function = m.Int32Constant(0); | 588 Node* function = m.Int32Constant(0); |
598 Node* first_arg = m.Int32Constant(1); | 589 Node* first_arg = m.Int32Constant(1); |
599 Node* arg_count = m.Int32Constant(2); | 590 Node* arg_count = m.Int32Constant(2); |
600 Node* call_js = m.CallJS(function, first_arg, arg_count); | 591 Node* call_js = m.CallJS(function, first_arg, arg_count); |
601 EXPECT_THAT( | 592 EXPECT_THAT( |
602 call_js, | 593 call_js, |
603 m.IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg, | 594 IsCall(_, IsHeapConstant(builtin.code()), arg_count, first_arg, |
604 function, IsParameter(Linkage::kInterpreterContextParameter))); | 595 function, IsParameter(Linkage::kInterpreterContextParameter), _, |
| 596 _)); |
605 } | 597 } |
606 } | 598 } |
607 | 599 |
608 | 600 |
609 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { | 601 TARGET_TEST_F(InterpreterAssemblerTest, LoadTypeFeedbackVector) { |
610 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { | 602 TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) { |
611 InterpreterAssemblerForTest m(this, bytecode); | 603 InterpreterAssemblerForTest m(this, bytecode); |
612 Node* feedback_vector = m.LoadTypeFeedbackVector(); | 604 Node* feedback_vector = m.LoadTypeFeedbackVector(); |
613 | 605 |
614 Matcher<Node*> load_function_matcher = m.IsLoad( | 606 Matcher<Node*> load_function_matcher = m.IsLoad( |
615 kMachAnyTagged, IsParameter(Linkage::kInterpreterRegisterFileParameter), | 607 kMachAnyTagged, IsParameter(Linkage::kInterpreterRegisterFileParameter), |
616 IsIntPtrConstant( | 608 IsIntPtrConstant( |
617 InterpreterFrameConstants::kFunctionFromRegisterPointer)); | 609 InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
618 Matcher<Node*> load_shared_function_info_matcher = | 610 Matcher<Node*> load_shared_function_info_matcher = |
619 m.IsLoad(kMachAnyTagged, load_function_matcher, | 611 m.IsLoad(kMachAnyTagged, load_function_matcher, |
620 IsIntPtrConstant(JSFunction::kSharedFunctionInfoOffset - | 612 IsIntPtrConstant(JSFunction::kSharedFunctionInfoOffset - |
621 kHeapObjectTag)); | 613 kHeapObjectTag)); |
622 | 614 |
623 EXPECT_THAT( | 615 EXPECT_THAT( |
624 feedback_vector, | 616 feedback_vector, |
625 m.IsLoad(kMachAnyTagged, load_shared_function_info_matcher, | 617 m.IsLoad(kMachAnyTagged, load_shared_function_info_matcher, |
626 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - | 618 IsIntPtrConstant(SharedFunctionInfo::kFeedbackVectorOffset - |
627 kHeapObjectTag))); | 619 kHeapObjectTag))); |
628 } | 620 } |
629 } | 621 } |
630 | 622 |
631 } // namespace compiler | 623 } // namespace compiler |
632 } // namespace internal | 624 } // namespace internal |
633 } // namespace v8 | 625 } // namespace v8 |
OLD | NEW |