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

Side by Side Diff: src/property.h

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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/ppc/macro-assembler-ppc.cc ('k') | src/regexp/jsregexp.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PROPERTY_H_ 5 #ifndef V8_PROPERTY_H_
6 #define V8_PROPERTY_H_ 6 #define V8_PROPERTY_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 14 matching lines...) Expand all
25 PropertyDetails GetDetails() const { return details_; } 25 PropertyDetails GetDetails() const { return details_; }
26 26
27 void SetSortedKeyIndex(int index) { details_ = details_.set_pointer(index); } 27 void SetSortedKeyIndex(int index) { details_ = details_.set_pointer(index); }
28 28
29 private: 29 private:
30 Handle<Name> key_; 30 Handle<Name> key_;
31 Handle<Object> value_; 31 Handle<Object> value_;
32 PropertyDetails details_; 32 PropertyDetails details_;
33 33
34 protected: 34 protected:
35 Descriptor() : details_(Smi::kZero) {} 35 Descriptor() : details_(Smi::FromInt(0)) {}
36 36
37 void Init(Handle<Name> key, Handle<Object> value, PropertyDetails details) { 37 void Init(Handle<Name> key, Handle<Object> value, PropertyDetails details) {
38 DCHECK(key->IsUniqueName()); 38 DCHECK(key->IsUniqueName());
39 key_ = key; 39 key_ = key;
40 value_ = value; 40 value_ = value;
41 details_ = details; 41 details_ = details;
42 } 42 }
43 43
44 Descriptor(Handle<Name> key, Handle<Object> value, PropertyDetails details) 44 Descriptor(Handle<Name> key, Handle<Object> value, PropertyDetails details)
45 : key_(key), value_(value), details_(details) { 45 : key_(key), value_(value), details_(details) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 PropertyAttributes attributes) 93 PropertyAttributes attributes)
94 : Descriptor(key, foreign, attributes, ACCESSOR_CONSTANT, 94 : Descriptor(key, foreign, attributes, ACCESSOR_CONSTANT,
95 Representation::Tagged()) {} 95 Representation::Tagged()) {}
96 }; 96 };
97 97
98 98
99 } // namespace internal 99 } // namespace internal
100 } // namespace v8 100 } // namespace v8
101 101
102 #endif // V8_PROPERTY_H_ 102 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | src/regexp/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698