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

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

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. 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/crankshaft/hydrogen.cc ('k') | src/crankshaft/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 // 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 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 V(EnterInlined) \ 88 V(EnterInlined) \
89 V(EnvironmentMarker) \ 89 V(EnvironmentMarker) \
90 V(ForceRepresentation) \ 90 V(ForceRepresentation) \
91 V(ForInCacheArray) \ 91 V(ForInCacheArray) \
92 V(ForInPrepareMap) \ 92 V(ForInPrepareMap) \
93 V(GetCachedArrayIndex) \ 93 V(GetCachedArrayIndex) \
94 V(Goto) \ 94 V(Goto) \
95 V(HasCachedArrayIndexAndBranch) \ 95 V(HasCachedArrayIndexAndBranch) \
96 V(HasInstanceTypeAndBranch) \ 96 V(HasInstanceTypeAndBranch) \
97 V(InnerAllocatedObject) \ 97 V(InnerAllocatedObject) \
98 V(InstanceOf) \
99 V(InvokeFunction) \ 98 V(InvokeFunction) \
100 V(HasInPrototypeChainAndBranch) \ 99 V(HasInPrototypeChainAndBranch) \
101 V(IsStringAndBranch) \ 100 V(IsStringAndBranch) \
102 V(IsSmiAndBranch) \ 101 V(IsSmiAndBranch) \
103 V(IsUndetectableAndBranch) \ 102 V(IsUndetectableAndBranch) \
104 V(LeaveInlined) \ 103 V(LeaveInlined) \
105 V(LoadContextSlot) \ 104 V(LoadContextSlot) \
106 V(LoadFieldByIndex) \ 105 V(LoadFieldByIndex) \
107 V(LoadFunctionPrototype) \ 106 V(LoadFunctionPrototype) \
108 V(LoadGlobalGeneric) \ 107 V(LoadGlobalGeneric) \
(...skipping 4155 matching lines...) Expand 10 before | Expand all | Expand 10 after
4264 4263
4265 private: 4264 private:
4266 HTypeofIsAndBranch(HValue* value, Handle<String> type_literal) 4265 HTypeofIsAndBranch(HValue* value, Handle<String> type_literal)
4267 : HUnaryControlInstruction(value, NULL, NULL), 4266 : HUnaryControlInstruction(value, NULL, NULL),
4268 type_literal_(Unique<String>::CreateUninitialized(type_literal)) { } 4267 type_literal_(Unique<String>::CreateUninitialized(type_literal)) { }
4269 4268
4270 Unique<String> type_literal_; 4269 Unique<String> type_literal_;
4271 }; 4270 };
4272 4271
4273 4272
4274 class HInstanceOf final : public HBinaryOperation {
4275 public:
4276 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOf, HValue*, HValue*);
4277
4278 Representation RequiredInputRepresentation(int index) override {
4279 return Representation::Tagged();
4280 }
4281
4282 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
4283
4284 DECLARE_CONCRETE_INSTRUCTION(InstanceOf)
4285
4286 private:
4287 HInstanceOf(HValue* context, HValue* left, HValue* right)
4288 : HBinaryOperation(context, left, right, HType::Boolean()) {
4289 set_representation(Representation::Tagged());
4290 SetAllSideEffects();
4291 }
4292 };
4293
4294
4295 class HHasInPrototypeChainAndBranch final 4273 class HHasInPrototypeChainAndBranch final
4296 : public HTemplateControlInstruction<2, 2> { 4274 : public HTemplateControlInstruction<2, 2> {
4297 public: 4275 public:
4298 DECLARE_INSTRUCTION_FACTORY_P2(HHasInPrototypeChainAndBranch, HValue*, 4276 DECLARE_INSTRUCTION_FACTORY_P2(HHasInPrototypeChainAndBranch, HValue*,
4299 HValue*); 4277 HValue*);
4300 4278
4301 HValue* object() const { return OperandAt(0); } 4279 HValue* object() const { return OperandAt(0); }
4302 HValue* prototype() const { return OperandAt(1); } 4280 HValue* prototype() const { return OperandAt(1); }
4303 4281
4304 Representation RequiredInputRepresentation(int index) override { 4282 Representation RequiredInputRepresentation(int index) override {
(...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after
7226 bool IsDeletable() const override { return true; } 7204 bool IsDeletable() const override { return true; }
7227 }; 7205 };
7228 7206
7229 #undef DECLARE_INSTRUCTION 7207 #undef DECLARE_INSTRUCTION
7230 #undef DECLARE_CONCRETE_INSTRUCTION 7208 #undef DECLARE_CONCRETE_INSTRUCTION
7231 7209
7232 } // namespace internal 7210 } // namespace internal
7233 } // namespace v8 7211 } // namespace v8
7234 7212
7235 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7213 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698