OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, | 270 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, |
271 Handle<JSObject> object); | 271 Handle<JSObject> object); |
272 | 272 |
273 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; | 273 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; |
274 | 274 |
275 // Computes the enumerable keys for a JSObject. Used for implementing | 275 // Computes the enumerable keys for a JSObject. Used for implementing |
276 // "for (n in object) { }". | 276 // "for (n in object) { }". |
277 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object, | 277 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object, |
278 KeyCollectionType type); | 278 KeyCollectionType type); |
279 Handle<JSArray> GetKeysFor(Handle<JSObject> object); | 279 Handle<JSArray> GetKeysFor(Handle<JSObject> object); |
280 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object); | 280 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object, |
| 281 bool cache_result); |
281 | 282 |
282 // Computes the union of keys and return the result. | 283 // Computes the union of keys and return the result. |
283 // Used for implementing "for (n in object) { }" | 284 // Used for implementing "for (n in object) { }" |
284 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, | 285 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, |
285 Handle<FixedArray> second); | 286 Handle<FixedArray> second); |
286 | 287 |
287 Handle<String> SubString(Handle<String> str, int start, int end); | 288 Handle<String> SubString(Handle<String> str, int start, int end); |
288 | 289 |
289 | 290 |
290 // Sets the expected number of properties for the function's instances. | 291 // Sets the expected number of properties for the function's instances. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 private: | 358 private: |
358 bool has_been_transformed_; // Tells whether the object has been transformed. | 359 bool has_been_transformed_; // Tells whether the object has been transformed. |
359 int unused_property_fields_; // Captures the unused number of field. | 360 int unused_property_fields_; // Captures the unused number of field. |
360 Handle<JSObject> object_; // The object being optimized. | 361 Handle<JSObject> object_; // The object being optimized. |
361 }; | 362 }; |
362 | 363 |
363 | 364 |
364 } } // namespace v8::internal | 365 } } // namespace v8::internal |
365 | 366 |
366 #endif // V8_HANDLES_H_ | 367 #endif // V8_HANDLES_H_ |
OLD | NEW |