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

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

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 5 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/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.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_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 5383 matching lines...) Expand 10 before | Expand all | Expand 10 after
5394 5394
5395 HEnvironment* environment_; 5395 HEnvironment* environment_;
5396 int index_; 5396 int index_;
5397 HPhi* incoming_value_; 5397 HPhi* incoming_value_;
5398 }; 5398 };
5399 5399
5400 5400
5401 class HLoadGlobalGeneric final : public HTemplateInstruction<2> { 5401 class HLoadGlobalGeneric final : public HTemplateInstruction<2> {
5402 public: 5402 public:
5403 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*, 5403 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*,
5404 Handle<String>, bool); 5404 Handle<String>, TypeofMode);
5405 5405
5406 HValue* context() { return OperandAt(0); } 5406 HValue* context() { return OperandAt(0); }
5407 HValue* global_object() { return OperandAt(1); } 5407 HValue* global_object() { return OperandAt(1); }
5408 Handle<String> name() const { return name_; } 5408 Handle<String> name() const { return name_; }
5409 bool for_typeof() const { return for_typeof_; } 5409 TypeofMode typeof_mode() const { return typeof_mode_; }
5410 FeedbackVectorICSlot slot() const { return slot_; } 5410 FeedbackVectorICSlot slot() const { return slot_; }
5411 Handle<TypeFeedbackVector> feedback_vector() const { 5411 Handle<TypeFeedbackVector> feedback_vector() const {
5412 return feedback_vector_; 5412 return feedback_vector_;
5413 } 5413 }
5414 bool HasVectorAndSlot() const { return true; } 5414 bool HasVectorAndSlot() const { return true; }
5415 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, 5415 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector,
5416 FeedbackVectorICSlot slot) { 5416 FeedbackVectorICSlot slot) {
5417 feedback_vector_ = vector; 5417 feedback_vector_ = vector;
5418 slot_ = slot; 5418 slot_ = slot;
5419 } 5419 }
5420 5420
5421 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 5421 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
5422 5422
5423 Representation RequiredInputRepresentation(int index) override { 5423 Representation RequiredInputRepresentation(int index) override {
5424 return Representation::Tagged(); 5424 return Representation::Tagged();
5425 } 5425 }
5426 5426
5427 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) 5427 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric)
5428 5428
5429 private: 5429 private:
5430 HLoadGlobalGeneric(HValue* context, HValue* global_object, 5430 HLoadGlobalGeneric(HValue* context, HValue* global_object,
5431 Handle<String> name, bool for_typeof) 5431 Handle<String> name, TypeofMode typeof_mode)
5432 : name_(name), 5432 : name_(name),
5433 for_typeof_(for_typeof), 5433 typeof_mode_(typeof_mode),
5434 slot_(FeedbackVectorICSlot::Invalid()) { 5434 slot_(FeedbackVectorICSlot::Invalid()) {
5435 SetOperandAt(0, context); 5435 SetOperandAt(0, context);
5436 SetOperandAt(1, global_object); 5436 SetOperandAt(1, global_object);
5437 set_representation(Representation::Tagged()); 5437 set_representation(Representation::Tagged());
5438 SetAllSideEffects(); 5438 SetAllSideEffects();
5439 } 5439 }
5440 5440
5441 Handle<String> name_; 5441 Handle<String> name_;
5442 bool for_typeof_; 5442 TypeofMode typeof_mode_;
5443 Handle<TypeFeedbackVector> feedback_vector_; 5443 Handle<TypeFeedbackVector> feedback_vector_;
5444 FeedbackVectorICSlot slot_; 5444 FeedbackVectorICSlot slot_;
5445 }; 5445 };
5446 5446
5447 5447
5448 class HAllocate final : public HTemplateInstruction<2> { 5448 class HAllocate final : public HTemplateInstruction<2> {
5449 public: 5449 public:
5450 static bool CompatibleInstanceTypes(InstanceType type1, 5450 static bool CompatibleInstanceTypes(InstanceType type1,
5451 InstanceType type2) { 5451 InstanceType type2) {
5452 return ComputeFlags(TENURED, type1) == ComputeFlags(TENURED, type2) && 5452 return ComputeFlags(TENURED, type1) == ComputeFlags(TENURED, type2) &&
(...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after
7968 }; 7968 };
7969 7969
7970 7970
7971 7971
7972 #undef DECLARE_INSTRUCTION 7972 #undef DECLARE_INSTRUCTION
7973 #undef DECLARE_CONCRETE_INSTRUCTION 7973 #undef DECLARE_CONCRETE_INSTRUCTION
7974 7974
7975 } } // namespace v8::internal 7975 } } // namespace v8::internal
7976 7976
7977 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7977 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698