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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // Script line number computations. | 258 // Script line number computations. |
259 void InitScriptLineEnds(Handle<Script> script); | 259 void InitScriptLineEnds(Handle<Script> script); |
260 int GetScriptLineNumber(Handle<Script> script, int code_position); | 260 int GetScriptLineNumber(Handle<Script> script, int code_position); |
261 | 261 |
262 // Computes the enumerable keys from interceptors. Used for debug mirrors and | 262 // Computes the enumerable keys from interceptors. Used for debug mirrors and |
263 // by GetKeysInFixedArrayFor below. | 263 // by GetKeysInFixedArrayFor below. |
264 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, | 264 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, |
265 Handle<JSObject> object); | 265 Handle<JSObject> object); |
266 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, | 266 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, |
267 Handle<JSObject> object); | 267 Handle<JSObject> object); |
| 268 |
| 269 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; |
| 270 |
268 // Computes the enumerable keys for a JSObject. Used for implementing | 271 // Computes the enumerable keys for a JSObject. Used for implementing |
269 // "for (n in object) { }". | 272 // "for (n in object) { }". |
270 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object); | 273 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object, |
| 274 KeyCollectionType type); |
271 Handle<JSArray> GetKeysFor(Handle<JSObject> object); | 275 Handle<JSArray> GetKeysFor(Handle<JSObject> object); |
272 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object); | 276 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object); |
273 | 277 |
274 // Computes the union of keys and return the result. | 278 // Computes the union of keys and return the result. |
275 // Used for implementing "for (n in object) { }" | 279 // Used for implementing "for (n in object) { }" |
276 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, | 280 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, |
277 Handle<FixedArray> second); | 281 Handle<FixedArray> second); |
278 | 282 |
279 Handle<String> SubString(Handle<String> str, int start, int end); | 283 Handle<String> SubString(Handle<String> str, int start, int end); |
280 | 284 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 private: | 350 private: |
347 bool has_been_transformed_; // Tells whether the object has been transformed. | 351 bool has_been_transformed_; // Tells whether the object has been transformed. |
348 int unused_property_fields_; // Captures the unused number of field. | 352 int unused_property_fields_; // Captures the unused number of field. |
349 Handle<JSObject> object_; // The object being optimized. | 353 Handle<JSObject> object_; // The object being optimized. |
350 }; | 354 }; |
351 | 355 |
352 | 356 |
353 } } // namespace v8::internal | 357 } } // namespace v8::internal |
354 | 358 |
355 #endif // V8_HANDLES_H_ | 359 #endif // V8_HANDLES_H_ |
OLD | NEW |