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

Side by Side Diff: src/hydrogen-instructions.h

Issue 11377135: Don't emit code for instructions that are hiding behind an HSoftDeoptimize (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 V(CompareGeneric) \ 97 V(CompareGeneric) \
98 V(CompareObjectEqAndBranch) \ 98 V(CompareObjectEqAndBranch) \
99 V(CompareMap) \ 99 V(CompareMap) \
100 V(CompareConstantEqAndBranch) \ 100 V(CompareConstantEqAndBranch) \
101 V(Constant) \ 101 V(Constant) \
102 V(Context) \ 102 V(Context) \
103 V(DeclareGlobals) \ 103 V(DeclareGlobals) \
104 V(DeleteProperty) \ 104 V(DeleteProperty) \
105 V(Deoptimize) \ 105 V(Deoptimize) \
106 V(Div) \ 106 V(Div) \
107 V(DummyUse) \
107 V(ElementsKind) \ 108 V(ElementsKind) \
108 V(EnterInlined) \ 109 V(EnterInlined) \
109 V(FastLiteral) \ 110 V(FastLiteral) \
110 V(FixedArrayBaseLength) \ 111 V(FixedArrayBaseLength) \
111 V(ForceRepresentation) \ 112 V(ForceRepresentation) \
112 V(FunctionLiteral) \ 113 V(FunctionLiteral) \
113 V(GetCachedArrayIndex) \ 114 V(GetCachedArrayIndex) \
114 V(GlobalObject) \ 115 V(GlobalObject) \
115 V(GlobalReceiver) \ 116 V(GlobalReceiver) \
116 V(Goto) \ 117 V(Goto) \
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 class HBlockEntry: public HTemplateInstruction<0> { 1018 class HBlockEntry: public HTemplateInstruction<0> {
1018 public: 1019 public:
1019 virtual Representation RequiredInputRepresentation(int index) { 1020 virtual Representation RequiredInputRepresentation(int index) {
1020 return Representation::None(); 1021 return Representation::None();
1021 } 1022 }
1022 1023
1023 DECLARE_CONCRETE_INSTRUCTION(BlockEntry) 1024 DECLARE_CONCRETE_INSTRUCTION(BlockEntry)
1024 }; 1025 };
1025 1026
1026 1027
1028 class HDummyUse: public HTemplateInstruction<1> {
1029 public:
1030 explicit HDummyUse(HValue* value) {
1031 SetOperandAt(0, value);
1032 // Pretend to be a Smi so that the HChange instructions inserted
1033 // before any use generate as little code as possible.
1034 set_representation(Representation::Tagged());
1035 set_type(HType::Smi());
1036 }
1037
1038 HValue* value() { return OperandAt(0); }
1039
1040 virtual Representation RequiredInputRepresentation(int index) {
1041 return Representation::None();
1042 }
1043
1044 virtual void PrintDataTo(StringStream* stream);
1045
1046 DECLARE_CONCRETE_INSTRUCTION(DummyUse);
1047 };
1048
1049
1027 // We insert soft-deoptimize when we hit code with unknown typefeedback, 1050 // We insert soft-deoptimize when we hit code with unknown typefeedback,
1028 // so that we get a chance of re-optimizing with useful typefeedback. 1051 // so that we get a chance of re-optimizing with useful typefeedback.
1029 // HSoftDeoptimize does not end a basic block as opposed to HDeoptimize. 1052 // HSoftDeoptimize does not end a basic block as opposed to HDeoptimize.
1030 class HSoftDeoptimize: public HTemplateInstruction<0> { 1053 class HSoftDeoptimize: public HTemplateInstruction<0> {
1031 public: 1054 public:
1032 virtual Representation RequiredInputRepresentation(int index) { 1055 virtual Representation RequiredInputRepresentation(int index) {
1033 return Representation::None(); 1056 return Representation::None();
1034 } 1057 }
1035 1058
1036 DECLARE_CONCRETE_INSTRUCTION(SoftDeoptimize) 1059 DECLARE_CONCRETE_INSTRUCTION(SoftDeoptimize)
(...skipping 4381 matching lines...) Expand 10 before | Expand all | Expand 10 after
5418 virtual bool IsDeletable() const { return true; } 5441 virtual bool IsDeletable() const { return true; }
5419 }; 5442 };
5420 5443
5421 5444
5422 #undef DECLARE_INSTRUCTION 5445 #undef DECLARE_INSTRUCTION
5423 #undef DECLARE_CONCRETE_INSTRUCTION 5446 #undef DECLARE_CONCRETE_INSTRUCTION
5424 5447
5425 } } // namespace v8::internal 5448 } } // namespace v8::internal
5426 5449
5427 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5450 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698