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

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

Issue 718833002: Classes: Cleanup default constructor flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 7549 matching lines...) Expand 10 before | Expand all | Expand 10 after
7560 7560
7561 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; } 7561 Handle<SharedFunctionInfo> shared_info() const { return shared_info_; }
7562 bool pretenure() const { return PretenureField::decode(bit_field_); } 7562 bool pretenure() const { return PretenureField::decode(bit_field_); }
7563 bool has_no_literals() const { 7563 bool has_no_literals() const {
7564 return HasNoLiteralsField::decode(bit_field_); 7564 return HasNoLiteralsField::decode(bit_field_);
7565 } 7565 }
7566 bool is_arrow() const { return IsArrowFunction(kind()); } 7566 bool is_arrow() const { return IsArrowFunction(kind()); }
7567 bool is_generator() const { return IsGeneratorFunction(kind()); } 7567 bool is_generator() const { return IsGeneratorFunction(kind()); }
7568 bool is_concise_method() const { return IsConciseMethod(kind()); } 7568 bool is_concise_method() const { return IsConciseMethod(kind()); }
7569 bool is_default_constructor() const { return IsDefaultConstructor(kind()); } 7569 bool is_default_constructor() const { return IsDefaultConstructor(kind()); }
7570 bool is_default_constructor_call_super() const {
7571 return IsDefaultConstructorCallSuper(kind());
7572 }
7573 FunctionKind kind() const { return FunctionKindField::decode(bit_field_); } 7570 FunctionKind kind() const { return FunctionKindField::decode(bit_field_); }
7574 StrictMode strict_mode() const { return StrictModeField::decode(bit_field_); } 7571 StrictMode strict_mode() const { return StrictModeField::decode(bit_field_); }
7575 7572
7576 private: 7573 private:
7577 HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared, 7574 HFunctionLiteral(HValue* context, Handle<SharedFunctionInfo> shared,
7578 bool pretenure) 7575 bool pretenure)
7579 : HTemplateInstruction<1>(HType::JSObject()), 7576 : HTemplateInstruction<1>(HType::JSObject()),
7580 shared_info_(shared), 7577 shared_info_(shared),
7581 bit_field_(FunctionKindField::encode(shared->kind()) | 7578 bit_field_(FunctionKindField::encode(shared->kind()) |
7582 PretenureField::encode(pretenure) | 7579 PretenureField::encode(pretenure) |
7583 HasNoLiteralsField::encode(shared->num_literals() == 0) | 7580 HasNoLiteralsField::encode(shared->num_literals() == 0) |
7584 StrictModeField::encode(shared->strict_mode())) { 7581 StrictModeField::encode(shared->strict_mode())) {
7585 SetOperandAt(0, context); 7582 SetOperandAt(0, context);
7586 set_representation(Representation::Tagged()); 7583 set_representation(Representation::Tagged());
7587 SetChangesFlag(kNewSpacePromotion); 7584 SetChangesFlag(kNewSpacePromotion);
7588 } 7585 }
7589 7586
7590 virtual bool IsDeletable() const OVERRIDE { return true; } 7587 virtual bool IsDeletable() const OVERRIDE { return true; }
7591 7588
7592 class FunctionKindField : public BitField<FunctionKind, 0, 5> {}; 7589 class FunctionKindField : public BitField<FunctionKind, 0, 4> {};
7593 class PretenureField : public BitField<bool, 5, 1> {}; 7590 class PretenureField : public BitField<bool, 5, 1> {};
7594 class HasNoLiteralsField : public BitField<bool, 6, 1> {}; 7591 class HasNoLiteralsField : public BitField<bool, 6, 1> {};
7595 class StrictModeField : public BitField<StrictMode, 7, 1> {}; 7592 class StrictModeField : public BitField<StrictMode, 7, 1> {};
7596 7593
7597 Handle<SharedFunctionInfo> shared_info_; 7594 Handle<SharedFunctionInfo> shared_info_;
7598 uint32_t bit_field_; 7595 uint32_t bit_field_;
7599 }; 7596 };
7600 7597
7601 7598
7602 class HTypeof FINAL : public HTemplateInstruction<2> { 7599 class HTypeof FINAL : public HTemplateInstruction<2> {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
7982 }; 7979 };
7983 7980
7984 7981
7985 7982
7986 #undef DECLARE_INSTRUCTION 7983 #undef DECLARE_INSTRUCTION
7987 #undef DECLARE_CONCRETE_INSTRUCTION 7984 #undef DECLARE_CONCRETE_INSTRUCTION
7988 7985
7989 } } // namespace v8::internal 7986 } } // namespace v8::internal
7990 7987
7991 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7988 #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