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

Side by Side Diff: test/unittests/compiler/instruction-selector-unittest.cc

Issue 2913783002: [builtins] Begin removing CodeFactory accessors (Closed)
Patch Set: V8_EXPORT_PRIVATE Created 3 years, 6 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-code-assembler.cc ('k') | no next file » | 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 "test/unittests/compiler/instruction-selector-unittest.h" 5 #include "test/unittests/compiler/instruction-selector-unittest.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/compiler-source-position-table.h" 8 #include "src/compiler/compiler-source-position-table.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/schedule.h" 10 #include "src/compiler/schedule.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 410
411 // Some arguments for the call node. 411 // Some arguments for the call node.
412 Node* function_node = m.Parameter(0); 412 Node* function_node = m.Parameter(0);
413 Node* receiver = m.Parameter(1); 413 Node* receiver = m.Parameter(1);
414 Node* context = m.Int32Constant(1); // Context is ignored. 414 Node* context = m.Int32Constant(1); // Context is ignored.
415 415
416 ZoneVector<MachineType> int32_type(1, MachineType::Int32(), zone()); 416 ZoneVector<MachineType> int32_type(1, MachineType::Int32(), zone());
417 ZoneVector<MachineType> float64_type(1, MachineType::Float64(), zone()); 417 ZoneVector<MachineType> float64_type(1, MachineType::Float64(), zone());
418 ZoneVector<MachineType> tagged_type(1, MachineType::AnyTagged(), zone()); 418 ZoneVector<MachineType> tagged_type(1, MachineType::AnyTagged(), zone());
419 419
420 Callable callable = CodeFactory::ToObject(isolate()); 420 Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
421 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( 421 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
422 isolate(), zone(), callable.descriptor(), 1, 422 isolate(), zone(), callable.descriptor(), 1,
423 CallDescriptor::kNeedsFrameState, Operator::kNoProperties); 423 CallDescriptor::kNeedsFrameState, Operator::kNoProperties);
424 424
425 // Build frame state for the state before the call. 425 // Build frame state for the state before the call.
426 Node* parameters = m.AddNode( 426 Node* parameters = m.AddNode(
427 m.common()->TypedStateValues(&int32_type, SparseInputMask::Dense()), 427 m.common()->TypedStateValues(&int32_type, SparseInputMask::Dense()),
428 m.Int32Constant(43)); 428 m.Int32Constant(43));
429 Node* locals = m.AddNode( 429 Node* locals = m.AddNode(
430 m.common()->TypedStateValues(&float64_type, SparseInputMask::Dense()), 430 m.common()->TypedStateValues(&float64_type, SparseInputMask::Dense()),
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 // Some arguments for the call node. 506 // Some arguments for the call node.
507 Node* function_node = m.Parameter(0); 507 Node* function_node = m.Parameter(0);
508 Node* receiver = m.Parameter(1); 508 Node* receiver = m.Parameter(1);
509 Node* context = m.Int32Constant(66); 509 Node* context = m.Int32Constant(66);
510 Node* context2 = m.Int32Constant(46); 510 Node* context2 = m.Int32Constant(46);
511 511
512 ZoneVector<MachineType> int32_type(1, MachineType::Int32(), zone()); 512 ZoneVector<MachineType> int32_type(1, MachineType::Int32(), zone());
513 ZoneVector<MachineType> int32x2_type(2, MachineType::Int32(), zone()); 513 ZoneVector<MachineType> int32x2_type(2, MachineType::Int32(), zone());
514 ZoneVector<MachineType> float64_type(1, MachineType::Float64(), zone()); 514 ZoneVector<MachineType> float64_type(1, MachineType::Float64(), zone());
515 515
516 Callable callable = CodeFactory::ToObject(isolate()); 516 Callable callable = Builtins::CallableFor(isolate(), Builtins::kToObject);
517 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( 517 CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
518 isolate(), zone(), callable.descriptor(), 1, 518 isolate(), zone(), callable.descriptor(), 1,
519 CallDescriptor::kNeedsFrameState, Operator::kNoProperties); 519 CallDescriptor::kNeedsFrameState, Operator::kNoProperties);
520 520
521 // Build frame state for the state before the call. 521 // Build frame state for the state before the call.
522 Node* parameters = m.AddNode( 522 Node* parameters = m.AddNode(
523 m.common()->TypedStateValues(&int32_type, SparseInputMask::Dense()), 523 m.common()->TypedStateValues(&int32_type, SparseInputMask::Dense()),
524 m.Int32Constant(63)); 524 m.Int32Constant(63));
525 Node* locals = m.AddNode( 525 Node* locals = m.AddNode(
526 m.common()->TypedStateValues(&int32_type, SparseInputMask::Dense()), 526 m.common()->TypedStateValues(&int32_type, SparseInputMask::Dense()),
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14))); 610 EXPECT_EQ(s.ToVreg(context2), s.ToVreg(call_instr->InputAt(14)));
611 // Continuation. 611 // Continuation.
612 612
613 EXPECT_EQ(kArchRet, s[index++]->arch_opcode()); 613 EXPECT_EQ(kArchRet, s[index++]->arch_opcode());
614 EXPECT_EQ(index, s.size()); 614 EXPECT_EQ(index, s.size());
615 } 615 }
616 616
617 } // namespace compiler 617 } // namespace compiler
618 } // namespace internal 618 } // namespace internal
619 } // namespace v8 619 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-code-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698