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

Side by Side Diff: src/compiler/common-operator.cc

Issue 1455913003: [turbofan] Fix CFI failures with Operator1 class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Better solution. Created 5 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
« no previous file with comments | « no previous file | src/compiler/js-operator.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/compiler/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 const Operator* CommonOperatorBuilder::Int64Constant(int64_t value) { 566 const Operator* CommonOperatorBuilder::Int64Constant(int64_t value) {
567 return new (zone()) Operator1<int64_t>( // -- 567 return new (zone()) Operator1<int64_t>( // --
568 IrOpcode::kInt64Constant, Operator::kPure, // opcode 568 IrOpcode::kInt64Constant, Operator::kPure, // opcode
569 "Int64Constant", // name 569 "Int64Constant", // name
570 0, 0, 0, 1, 0, 0, // counts 570 0, 0, 0, 1, 0, 0, // counts
571 value); // parameter 571 value); // parameter
572 } 572 }
573 573
574 574
575 const Operator* CommonOperatorBuilder::Float32Constant(volatile float value) { 575 const Operator* CommonOperatorBuilder::Float32Constant(volatile float value) {
576 return new (zone()) 576 return new (zone()) Operator1<float>( // --
577 Operator1<float, base::bit_equal_to<float>, base::bit_hash<float>>( // -- 577 IrOpcode::kFloat32Constant, Operator::kPure, // opcode
578 IrOpcode::kFloat32Constant, Operator::kPure, // opcode 578 "Float32Constant", // name
579 "Float32Constant", // name 579 0, 0, 0, 1, 0, 0, // counts
580 0, 0, 0, 1, 0, 0, // counts 580 value); // parameter
581 value); // parameter
582 } 581 }
583 582
584 583
585 const Operator* CommonOperatorBuilder::Float64Constant(volatile double value) { 584 const Operator* CommonOperatorBuilder::Float64Constant(volatile double value) {
586 return new (zone()) Operator1<double, base::bit_equal_to<double>, 585 return new (zone()) Operator1<double>( // --
587 base::bit_hash<double>>( // -- 586 IrOpcode::kFloat64Constant, Operator::kPure, // opcode
588 IrOpcode::kFloat64Constant, Operator::kPure, // opcode 587 "Float64Constant", // name
589 "Float64Constant", // name 588 0, 0, 0, 1, 0, 0, // counts
590 0, 0, 0, 1, 0, 0, // counts 589 value); // parameter
591 value); // parameter
592 } 590 }
593 591
594 592
595 const Operator* CommonOperatorBuilder::ExternalConstant( 593 const Operator* CommonOperatorBuilder::ExternalConstant(
596 const ExternalReference& value) { 594 const ExternalReference& value) {
597 return new (zone()) Operator1<ExternalReference>( // -- 595 return new (zone()) Operator1<ExternalReference>( // --
598 IrOpcode::kExternalConstant, Operator::kPure, // opcode 596 IrOpcode::kExternalConstant, Operator::kPure, // opcode
599 "ExternalConstant", // name 597 "ExternalConstant", // name
600 0, 0, 0, 1, 0, 0, // counts 598 0, 0, 0, 1, 0, 0, // counts
601 value); // parameter 599 value); // parameter
602 } 600 }
603 601
604 602
605 const Operator* CommonOperatorBuilder::NumberConstant(volatile double value) { 603 const Operator* CommonOperatorBuilder::NumberConstant(volatile double value) {
606 return new (zone()) Operator1<double, base::bit_equal_to<double>, 604 return new (zone()) Operator1<double>( // --
607 base::bit_hash<double>>( // -- 605 IrOpcode::kNumberConstant, Operator::kPure, // opcode
608 IrOpcode::kNumberConstant, Operator::kPure, // opcode 606 "NumberConstant", // name
609 "NumberConstant", // name 607 0, 0, 0, 1, 0, 0, // counts
610 0, 0, 0, 1, 0, 0, // counts 608 value); // parameter
611 value); // parameter
612 } 609 }
613 610
614 611
615 const Operator* CommonOperatorBuilder::HeapConstant( 612 const Operator* CommonOperatorBuilder::HeapConstant(
616 const Handle<HeapObject>& value) { 613 const Handle<HeapObject>& value) {
617 return new (zone()) 614 return new (zone()) Operator1<Handle<HeapObject>>( // --
618 Operator1<Handle<HeapObject>, Handle<HeapObject>::equal_to, 615 IrOpcode::kHeapConstant, Operator::kPure, // opcode
619 Handle<HeapObject>::hash>( // -- 616 "HeapConstant", // name
620 IrOpcode::kHeapConstant, Operator::kPure, // opcode 617 0, 0, 0, 1, 0, 0, // counts
621 "HeapConstant", // name 618 value); // parameter
622 0, 0, 0, 1, 0, 0, // counts
623 value); // parameter
624 } 619 }
625 620
626 621
627 const Operator* CommonOperatorBuilder::Select(MachineType type, 622 const Operator* CommonOperatorBuilder::Select(MachineType type,
628 BranchHint hint) { 623 BranchHint hint) {
629 return new (zone()) Operator1<SelectParameters>( // -- 624 return new (zone()) Operator1<SelectParameters>( // --
630 IrOpcode::kSelect, Operator::kPure, // opcode 625 IrOpcode::kSelect, Operator::kPure, // opcode
631 "Select", // name 626 "Select", // name
632 3, 0, 0, 1, 0, 0, // counts 627 3, 0, 0, 1, 0, 0, // counts
633 SelectParameters(type, hint)); // parameter 628 SelectParameters(type, hint)); // parameter
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 Handle<SharedFunctionInfo> shared_info, 810 Handle<SharedFunctionInfo> shared_info,
816 ContextCallingMode context_calling_mode) { 811 ContextCallingMode context_calling_mode) {
817 return new (zone()->New(sizeof(FrameStateFunctionInfo))) 812 return new (zone()->New(sizeof(FrameStateFunctionInfo)))
818 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info, 813 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info,
819 context_calling_mode); 814 context_calling_mode);
820 } 815 }
821 816
822 } // namespace compiler 817 } // namespace compiler
823 } // namespace internal 818 } // namespace internal
824 } // namespace v8 819 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698