| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 293 // does not end with a new line character, this character may optionally be | 293 // does not end with a new line character, this character may optionally be | 
| 294 // imagined. | 294 // imagined. | 
| 295 Handle<FixedArray> CalculateLineEnds(Handle<String> string, | 295 Handle<FixedArray> CalculateLineEnds(Handle<String> string, | 
| 296                                      bool with_imaginary_last_new_line); | 296                                      bool with_imaginary_last_new_line); | 
| 297 int GetScriptLineNumber(Handle<Script> script, int code_position); | 297 int GetScriptLineNumber(Handle<Script> script, int code_position); | 
| 298 // The safe version does not make heap allocations but may work much slower. | 298 // The safe version does not make heap allocations but may work much slower. | 
| 299 int GetScriptLineNumberSafe(Handle<Script> script, int code_position); | 299 int GetScriptLineNumberSafe(Handle<Script> script, int code_position); | 
| 300 | 300 | 
| 301 // Computes the enumerable keys from interceptors. Used for debug mirrors and | 301 // Computes the enumerable keys from interceptors. Used for debug mirrors and | 
| 302 // by GetKeysInFixedArrayFor below. | 302 // by GetKeysInFixedArrayFor below. | 
| 303 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, | 303 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSReceiver> receiver, | 
| 304                                                  Handle<JSObject> object); | 304                                                  Handle<JSObject> object); | 
| 305 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, | 305 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSReceiver> receiver, | 
| 306                                                    Handle<JSObject> object); | 306                                                    Handle<JSObject> object); | 
| 307 | 307 | 
| 308 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; | 308 enum KeyCollectionType { LOCAL_ONLY, INCLUDE_PROTOS }; | 
| 309 | 309 | 
| 310 // Computes the enumerable keys for a JSObject. Used for implementing | 310 // Computes the enumerable keys for a JSObject. Used for implementing | 
| 311 // "for (n in object) { }". | 311 // "for (n in object) { }". | 
| 312 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSObject> object, | 312 Handle<FixedArray> GetKeysInFixedArrayFor(Handle<JSReceiver> object, | 
| 313                                           KeyCollectionType type); | 313                                           KeyCollectionType type, | 
| 314 Handle<JSArray> GetKeysFor(Handle<JSObject> object); | 314                                           bool* threw); | 
|  | 315 Handle<JSArray> GetKeysFor(Handle<JSReceiver> object, bool* threw); | 
| 315 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object, | 316 Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object, | 
| 316                                        bool cache_result); | 317                                        bool cache_result); | 
| 317 | 318 | 
| 318 // Computes the union of keys and return the result. | 319 // Computes the union of keys and return the result. | 
| 319 // Used for implementing "for (n in object) { }" | 320 // Used for implementing "for (n in object) { }" | 
| 320 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, | 321 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, | 
| 321                                Handle<FixedArray> second); | 322                                Handle<FixedArray> second); | 
| 322 | 323 | 
| 323 Handle<String> SubString(Handle<String> str, | 324 Handle<String> SubString(Handle<String> str, | 
| 324                          int start, | 325                          int start, | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 375   inline NoHandleAllocation(); | 376   inline NoHandleAllocation(); | 
| 376   inline ~NoHandleAllocation(); | 377   inline ~NoHandleAllocation(); | 
| 377  private: | 378  private: | 
| 378   int level_; | 379   int level_; | 
| 379 #endif | 380 #endif | 
| 380 }; | 381 }; | 
| 381 | 382 | 
| 382 } }  // namespace v8::internal | 383 } }  // namespace v8::internal | 
| 383 | 384 | 
| 384 #endif  // V8_HANDLES_H_ | 385 #endif  // V8_HANDLES_H_ | 
| OLD | NEW | 
|---|