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

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

Issue 1994503002: [turbofan] Turn common Guard operator into simplified TypeGuard. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « src/compiler/common-operator.h ('k') | src/compiler/common-operator-reducer.h » ('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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 break; 753 break;
754 } 754 }
755 // Uncached. 755 // Uncached.
756 return new (zone()) Operator( // -- 756 return new (zone()) Operator( // --
757 IrOpcode::kEffectPhi, Operator::kPure, // opcode 757 IrOpcode::kEffectPhi, Operator::kPure, // opcode
758 "EffectPhi", // name 758 "EffectPhi", // name
759 0, effect_input_count, 1, 0, 1, 0); // counts 759 0, effect_input_count, 1, 0, 1, 0); // counts
760 } 760 }
761 761
762 762
763 const Operator* CommonOperatorBuilder::Guard(Type* type) {
764 return new (zone()) Operator1<Type*>( // --
765 IrOpcode::kGuard, Operator::kKontrol, // opcode
766 "Guard", // name
767 1, 0, 1, 1, 0, 0, // counts
768 type); // parameter
769 }
770
771
772 const Operator* CommonOperatorBuilder::StateValues(int arguments) { 763 const Operator* CommonOperatorBuilder::StateValues(int arguments) {
773 switch (arguments) { 764 switch (arguments) {
774 #define CACHED_STATE_VALUES(arguments) \ 765 #define CACHED_STATE_VALUES(arguments) \
775 case arguments: \ 766 case arguments: \
776 return &cache_.kStateValues##arguments##Operator; 767 return &cache_.kStateValues##arguments##Operator;
777 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES) 768 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES)
778 #undef CACHED_STATE_VALUES 769 #undef CACHED_STATE_VALUES
779 default: 770 default:
780 break; 771 break;
781 } 772 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 CommonOperatorBuilder::CreateFrameStateFunctionInfo( 887 CommonOperatorBuilder::CreateFrameStateFunctionInfo(
897 FrameStateType type, int parameter_count, int local_count, 888 FrameStateType type, int parameter_count, int local_count,
898 Handle<SharedFunctionInfo> shared_info) { 889 Handle<SharedFunctionInfo> shared_info) {
899 return new (zone()->New(sizeof(FrameStateFunctionInfo))) 890 return new (zone()->New(sizeof(FrameStateFunctionInfo)))
900 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); 891 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info);
901 } 892 }
902 893
903 } // namespace compiler 894 } // namespace compiler
904 } // namespace internal 895 } // namespace internal
905 } // namespace v8 896 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/common-operator-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698