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

Side by Side Diff: src/property-details.h

Issue 18712002: Convert UnaryOpStub to a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address review Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/type-info.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // ABSENT can never be stored in or returned from a descriptor's attributes 48 // ABSENT can never be stored in or returned from a descriptor's attributes
49 // bitfield. It is only used as a return value meaning the attributes of 49 // bitfield. It is only used as a return value meaning the attributes of
50 // a non-existent property. 50 // a non-existent property.
51 }; 51 };
52 52
53 53
54 namespace v8 { 54 namespace v8 {
55 namespace internal { 55 namespace internal {
56 56
57 class Smi; 57 class Smi;
58 class Type;
59 class TypeInfo;
58 60
59 // Type of properties. 61 // Type of properties.
60 // Order of properties is significant. 62 // Order of properties is significant.
61 // Must fit in the BitField PropertyDetails::TypeField. 63 // Must fit in the BitField PropertyDetails::TypeField.
62 // A copy of this is in mirror-debugger.js. 64 // A copy of this is in mirror-debugger.js.
63 enum PropertyType { 65 enum PropertyType {
64 // Only in slow mode. 66 // Only in slow mode.
65 NORMAL = 0, 67 NORMAL = 0,
66 // Only in fast mode. 68 // Only in fast mode.
67 FIELD = 1, 69 FIELD = 1,
(...skipping 26 matching lines...) Expand all
94 static Representation None() { return Representation(kNone); } 96 static Representation None() { return Representation(kNone); }
95 static Representation Tagged() { return Representation(kTagged); } 97 static Representation Tagged() { return Representation(kTagged); }
96 static Representation Smi() { return Representation(kSmi); } 98 static Representation Smi() { return Representation(kSmi); }
97 static Representation Integer32() { return Representation(kInteger32); } 99 static Representation Integer32() { return Representation(kInteger32); }
98 static Representation Double() { return Representation(kDouble); } 100 static Representation Double() { return Representation(kDouble); }
99 static Representation HeapObject() { return Representation(kHeapObject); } 101 static Representation HeapObject() { return Representation(kHeapObject); }
100 static Representation External() { return Representation(kExternal); } 102 static Representation External() { return Representation(kExternal); }
101 103
102 static Representation FromKind(Kind kind) { return Representation(kind); } 104 static Representation FromKind(Kind kind) { return Representation(kind); }
103 105
106 // TODO(rossberg): this should die eventually.
107 static Representation FromType(TypeInfo info);
108 static Representation FromType(Handle<Type> type);
109
104 bool Equals(const Representation& other) const { 110 bool Equals(const Representation& other) const {
105 return kind_ == other.kind_; 111 return kind_ == other.kind_;
106 } 112 }
107 113
108 bool IsCompatibleForLoad(const Representation& other) const { 114 bool IsCompatibleForLoad(const Representation& other) const {
109 return (IsDouble() && other.IsDouble()) || 115 return (IsDouble() && other.IsDouble()) ||
110 (!IsDouble() && !other.IsDouble()); 116 (!IsDouble() && !other.IsDouble());
111 } 117 }
112 118
113 bool IsCompatibleForStore(const Representation& other) const { 119 bool IsCompatibleForStore(const Representation& other) const {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 PropertyDetails(int value, PropertyAttributes attributes) { 269 PropertyDetails(int value, PropertyAttributes attributes) {
264 value_ = AttributesField::update(value, attributes); 270 value_ = AttributesField::update(value, attributes);
265 } 271 }
266 272
267 uint32_t value_; 273 uint32_t value_;
268 }; 274 };
269 275
270 } } // namespace v8::internal 276 } } // namespace v8::internal
271 277
272 #endif // V8_PROPERTY_DETAILS_H_ 278 #endif // V8_PROPERTY_DETAILS_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698