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

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

Issue 700523003: Classes: Partial fix for constructor not calling super (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove todo Created 6 years, 1 month 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/globals.h ('k') | src/objects.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 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 <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 7544 matching lines...) Expand 10 before | Expand all | Expand 10 after
7555 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral) 7555 DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral)
7556 7556
7557 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } 7557 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
7558 bool pretenure() const { return PretenureField::decode(bit_field_); } 7558 bool pretenure() const { return PretenureField::decode(bit_field_); }
7559 bool has_no_literals() const { 7559 bool has_no_literals() const {
7560 return HasNoLiteralsField::decode(bit_field_); 7560 return HasNoLiteralsField::decode(bit_field_);
7561 } 7561 }
7562 bool is_arrow() const { return IsArrowFunction(kind()); } 7562 bool is_arrow() const { return IsArrowFunction(kind()); }
7563 bool is_generator() const { return IsGeneratorFunction(kind()); } 7563 bool is_generator() const { return IsGeneratorFunction(kind()); }
7564 bool is_concise_method() const { return IsConciseMethod(kind()); } 7564 bool is_concise_method() const { return IsConciseMethod(kind()); }
7565 bool is_default_constructor() const { return IsDefaultConstructor(kind()); }
7566 bool is_default_constructor_call_super() const {
7567 return IsDefaultConstructorCallSuper(kind());
7568 }
7565 FunctionKind kind() const { return FunctionKindField::decode(bit_field_); } 7569 FunctionKind kind() const { return FunctionKindField::decode(bit_field_); }
7566 StrictMode strict_mode() const { return StrictModeField::decode(bit_field_); } 7570 StrictMode strict_mode() const { return StrictModeField::decode(bit_field_); }
7567 7571
7568 private: 7572 private:
7569 HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared, 7573 HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared,
7570 bool pretenure) 7574 bool pretenure)
7571 : HTemplateInstruction<1>(HType::JSObject()), 7575 : HTemplateInstruction<1>(HType::JSObject()),
7572 shared_info_(shared), 7576 shared_info_(shared),
7573 bit_field_(FunctionKindField::encode(shared->kind()) | 7577 bit_field_(FunctionKindField::encode(shared->kind()) |
7574 PretenureField::encode(pretenure) | 7578 PretenureField::encode(pretenure) |
7575 HasNoLiteralsField::encode(shared->num_literals() == 0) | 7579 HasNoLiteralsField::encode(shared->num_literals() == 0) |
7576 StrictModeField::encode(shared->strict_mode())) { 7580 StrictModeField::encode(shared->strict_mode())) {
7577 SetOperandAt(0, context); 7581 SetOperandAt(0, context);
7578 set_representation(Representation::Tagged()); 7582 set_representation(Representation::Tagged());
7579 SetChangesFlag(kNewSpacePromotion); 7583 SetChangesFlag(kNewSpacePromotion);
7580 } 7584 }
7581 7585
7582 virtual bool IsDeletable() const OVERRIDE { return true; } 7586 virtual bool IsDeletable() const OVERRIDE { return true; }
7583 7587
7584 class FunctionKindField : public BitField<FunctionKind, 0, 3> {}; 7588 class FunctionKindField : public BitField<FunctionKind, 0, 5> {};
7585 class PretenureField : public BitField<bool, 3, 1> {}; 7589 class PretenureField : public BitField<bool, 5, 1> {};
7586 class HasNoLiteralsField : public BitField<bool, 4, 1> {}; 7590 class HasNoLiteralsField : public BitField<bool, 6, 1> {};
7587 class StrictModeField : public BitField<StrictMode, 5, 1> {}; 7591 class StrictModeField : public BitField<StrictMode, 7, 1> {};
7588 7592
7589 Handle<SharedFunctionInfo> shared_info_; 7593 Handle<SharedFunctionInfo> shared_info_;
7590 uint32_t bit_field_; 7594 uint32_t bit_field_;
7591 }; 7595 };
7592 7596
7593 7597
7594 class HTypeof FINAL : public HTemplateInstruction<2> { 7598 class HTypeof FINAL : public HTemplateInstruction<2> {
7595 public: 7599 public:
7596 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue*); 7600 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P1(HTypeof, HValue*);
7597 7601
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
7974 }; 7978 };
7975 7979
7976 7980
7977 7981
7978 #undef DECLARE_INSTRUCTION 7982 #undef DECLARE_INSTRUCTION
7979 #undef DECLARE_CONCRETE_INSTRUCTION 7983 #undef DECLARE_CONCRETE_INSTRUCTION
7980 7984
7981 } } // namespace v8::internal 7985 } } // namespace v8::internal
7982 7986
7983 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7987 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698