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

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

Issue 883073008: Accessor functions should have no prototype property (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use bitshift Created 5 years, 10 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/globals.h ('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 7573 matching lines...) Expand 10 before | Expand all | Expand 10 after
7584 return Representation::Tagged(); 7584 return Representation::Tagged();
7585 } 7585 }
7586 7586
7587 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral) 7587 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral)
7588 7588
7589 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } 7589 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
7590 bool pretenure() const { return PretenureField::decode(bit_field_); } 7590 bool pretenure() const { return PretenureField::decode(bit_field_); }
7591 bool has_no_literals() const { 7591 bool has_no_literals() const {
7592 return HasNoLiteralsField::decode(bit_field_); 7592 return HasNoLiteralsField::decode(bit_field_);
7593 } 7593 }
7594 bool is_arrow() const { return IsArrowFunction(kind()); }
7595 bool is_generator() const { return IsGeneratorFunction(kind()); }
7596 bool is_concise_method() const { return IsConciseMethod(kind()); }
7597 bool is_default_constructor() const { return IsDefaultConstructor(kind()); }
7598 FunctionKind kind() const { return FunctionKindField::decode(bit_field_); } 7594 FunctionKind kind() const { return FunctionKindField::decode(bit_field_); }
7599 LanguageMode language_mode() const { 7595 LanguageMode language_mode() const {
7600 return LanguageModeField::decode(bit_field_); 7596 return LanguageModeField::decode(bit_field_);
7601 } 7597 }
7602 7598
7603 private: 7599 private:
7604 HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared, 7600 HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared,
7605 bool pretenure) 7601 bool pretenure)
7606 : HTemplateInstruction<1>(HType::JSObject()), 7602 : HTemplateInstruction<1>(HType::JSObject()),
7607 shared_info_(shared), 7603 shared_info_(shared),
7608 bit_field_(FunctionKindField::encode(shared->kind()) | 7604 bit_field_(FunctionKindField::encode(shared->kind()) |
7609 PretenureField::encode(pretenure) | 7605 PretenureField::encode(pretenure) |
7610 HasNoLiteralsField::encode(shared->num_literals() == 0) | 7606 HasNoLiteralsField::encode(shared->num_literals() == 0) |
7611 LanguageModeField::encode(shared->language_mode())) { 7607 LanguageModeField::encode(shared->language_mode())) {
7612 SetOperandAt(0, context); 7608 SetOperandAt(0, context);
7613 set_representation(Representation::Tagged()); 7609 set_representation(Representation::Tagged());
7614 SetChangesFlag(kNewSpacePromotion); 7610 SetChangesFlag(kNewSpacePromotion);
7615 } 7611 }
7616 7612
7617 bool IsDeletable() const OVERRIDE { return true; } 7613 bool IsDeletable() const OVERRIDE { return true; }
7618 7614
7619 class FunctionKindField : public BitField<FunctionKind, 0, 4> {}; 7615 class FunctionKindField : public BitField<FunctionKind, 0, 6> {};
7620 class PretenureField : public BitField<bool, 5, 1> {}; 7616 class PretenureField : public BitField<bool, 6, 1> {};
7621 class HasNoLiteralsField : public BitField<bool, 6, 1> {}; 7617 class HasNoLiteralsField : public BitField<bool, 7, 1> {};
7622 STATIC_ASSERT(LANGUAGE_END == 3); 7618 STATIC_ASSERT(LANGUAGE_END == 3);
7623 class LanguageModeField : public BitField<LanguageMode, 7, 2> {}; 7619 class LanguageModeField : public BitField<LanguageMode, 8, 2> {};
7624 7620
7625 Handle<SharedFunctionInfo> shared_info_; 7621 Handle<SharedFunctionInfo> shared_info_;
7626 uint32_t bit_field_; 7622 uint32_t bit_field_;
7627 }; 7623 };
7628 7624
7629 7625
7630 class HTypeof FINAL : public HTemplateInstruction<2> { 7626 class HTypeof FINAL : public HTemplateInstruction<2> {
7631 public: 7627 public:
7632 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue*); 7628 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue*);
7633 7629
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
8000 }; 7996 };
8001 7997
8002 7998
8003 7999
8004 #undef DECLARE_INSTRUCTION 8000 #undef DECLARE_INSTRUCTION
8005 #undef DECLARE_CONCRETE_INSTRUCTION 8001 #undef DECLARE_CONCRETE_INSTRUCTION
8006 8002
8007 } } // namespace v8::internal 8003 } } // namespace v8::internal
8008 8004
8009 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8005 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698