OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 // does not end with a new line character, this character may optionally be | 288 // does not end with a new line character, this character may optionally be |
289 // imagined. | 289 // imagined. |
290 Handle<FixedArray> CalculateLineEnds(Handle<String> string, | 290 Handle<FixedArray> CalculateLineEnds(Handle<String> string, |
291 bool with_imaginary_last_new_line); | 291 bool with_imaginary_last_new_line); |
292 int GetScriptLineNumber(Handle<Script> script, int code_position); | 292 int GetScriptLineNumber(Handle<Script> script, int code_position); |
293 // The safe version does not make heap allocations but may work much slower. | 293 // The safe version does not make heap allocations but may work much slower. |
294 int GetScriptLineNumberSafe(Handle<Script> script, int code_position); | 294 int GetScriptLineNumberSafe(Handle<Script> script, int code_position); |
295 | 295 |
296 // Computes the enumerable keys from interceptors. Used for debug mirrors and | 296 // Computes the enumerable keys from interceptors. Used for debug mirrors and |
297 // by GetKeysInFixedArrayFor below. | 297 // by GetKeysInFixedArrayFor below. |
298 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, | 298 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSReceiver> receiver, |
299 Handle<JSObject> object); | 299 Handle<JSObject> object); |
300 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, | 300 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSReceiver> receiver, |
301 Handle<JSObject> object); | 301 Handle<JSObject> object); |
302 | 302 |
303 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; | 303 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; |
304 | 304 |
305 // Computes the enumerable keys for a JSObject. Used for implementing | 305 // Computes the enumerable keys for a JSObject. Used for implementing |
306 // "for (n in object) { }". | 306 // "for (n in object) { }". |
307 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object, | 307 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSReceiver> object, |
308 KeyCollectionType type); | 308 KeyCollectionType type, |
309 Handle<JSArray> GetKeysFor(Handle<JSObject> object); | 309 bool* threw); |
| 310 Handle<JSArray> GetKeysFor(Handle<JSReceiver> object, bool* threw); |
310 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object, | 311 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object, |
311 bool cache_result); | 312 bool cache_result); |
312 | 313 |
313 // Computes the union of keys and return the result. | 314 // Computes the union of keys and return the result. |
314 // Used for implementing "for (n in object) { }" | 315 // Used for implementing "for (n in object) { }" |
315 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, | 316 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, |
316 Handle<FixedArray> second); | 317 Handle<FixedArray> second); |
317 | 318 |
318 Handle<String> SubString(Handle<String> str, | 319 Handle<String> SubString(Handle<String> str, |
319 int start, | 320 int start, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 inline NoHandleAllocation(); | 355 inline NoHandleAllocation(); |
355 inline ~NoHandleAllocation(); | 356 inline ~NoHandleAllocation(); |
356 private: | 357 private: |
357 int level_; | 358 int level_; |
358 #endif | 359 #endif |
359 }; | 360 }; |
360 | 361 |
361 } } // namespace v8::internal | 362 } } // namespace v8::internal |
362 | 363 |
363 #endif // V8_HANDLES_H_ | 364 #endif // V8_HANDLES_H_ |
OLD | NEW |