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

Side by Side Diff: src/property.h

Issue 10692185: Couple the enumeration index of a property to the size of the descriptor array where it first appea… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use the enumeration index of the LastAdded descriptor for appending. Created 8 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-inl.h ('k') | no next file » | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 friend class DescriptorArray; 100 friend class DescriptorArray;
101 }; 101 };
102 102
103 103
104 class FieldDescriptor: public Descriptor { 104 class FieldDescriptor: public Descriptor {
105 public: 105 public:
106 FieldDescriptor(String* key, 106 FieldDescriptor(String* key,
107 int field_index, 107 int field_index,
108 PropertyAttributes attributes, 108 PropertyAttributes attributes,
109 int index) 109 int index = 0)
110 : Descriptor(key, Smi::FromInt(field_index), attributes, FIELD, index) {} 110 : Descriptor(key, Smi::FromInt(field_index), attributes, FIELD, index) {}
111 }; 111 };
112 112
113 113
114 class ConstantFunctionDescriptor: public Descriptor { 114 class ConstantFunctionDescriptor: public Descriptor {
115 public: 115 public:
116 ConstantFunctionDescriptor(String* key, 116 ConstantFunctionDescriptor(String* key,
117 JSFunction* function, 117 JSFunction* function,
118 PropertyAttributes attributes, 118 PropertyAttributes attributes,
119 int index) 119 int index)
120 : Descriptor(key, function, attributes, CONSTANT_FUNCTION, index) {} 120 : Descriptor(key, function, attributes, CONSTANT_FUNCTION, index) {}
121 }; 121 };
122 122
123 123
124 class CallbacksDescriptor: public Descriptor { 124 class CallbacksDescriptor: public Descriptor {
125 public: 125 public:
126 CallbacksDescriptor(String* key, 126 CallbacksDescriptor(String* key,
127 Object* foreign, 127 Object* foreign,
128 PropertyAttributes attributes, 128 PropertyAttributes attributes,
129 int index) 129 int index = 0)
130 : Descriptor(key, foreign, attributes, CALLBACKS, index) {} 130 : Descriptor(key, foreign, attributes, CALLBACKS, index) {}
131 }; 131 };
132 132
133 133
134 class LookupResult BASE_EMBEDDED { 134 class LookupResult BASE_EMBEDDED {
135 public: 135 public:
136 explicit LookupResult(Isolate* isolate) 136 explicit LookupResult(Isolate* isolate)
137 : isolate_(isolate), 137 : isolate_(isolate),
138 next_(isolate->top_lookup_result()), 138 next_(isolate->top_lookup_result()),
139 lookup_type_(NOT_FOUND), 139 lookup_type_(NOT_FOUND),
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 JSReceiver* holder_; 406 JSReceiver* holder_;
407 int number_; 407 int number_;
408 bool cacheable_; 408 bool cacheable_;
409 PropertyDetails details_; 409 PropertyDetails details_;
410 }; 410 };
411 411
412 412
413 } } // namespace v8::internal 413 } } // namespace v8::internal
414 414
415 #endif // V8_PROPERTY_H_ 415 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698