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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 264 |
265 Handle<FixedArray> AddKeysFromJSArray(Handle<FixedArray>, | 265 Handle<FixedArray> AddKeysFromJSArray(Handle<FixedArray>, |
266 Handle<JSArray> array); | 266 Handle<JSArray> array); |
267 | 267 |
268 // Get the JS object corresponding to the given script; create it | 268 // Get the JS object corresponding to the given script; create it |
269 // if none exists. | 269 // if none exists. |
270 Handle<JSValue> GetScriptWrapper(Handle<Script> script); | 270 Handle<JSValue> GetScriptWrapper(Handle<Script> script); |
271 | 271 |
272 // Script line number computations. | 272 // Script line number computations. |
273 void InitScriptLineEnds(Handle<Script> script); | 273 void InitScriptLineEnds(Handle<Script> script); |
| 274 // For string calculates an array of line end positions. If the string |
| 275 // does not end with a new line character, this character may optionally be |
| 276 // imagined. |
| 277 Handle<FixedArray> CalculateLineEnds(Handle<String> string, |
| 278 bool with_imaginary_last_new_line); |
274 int GetScriptLineNumber(Handle<Script> script, int code_position); | 279 int GetScriptLineNumber(Handle<Script> script, int code_position); |
275 // The safe version does not make heap allocations but may work much slower. | 280 // The safe version does not make heap allocations but may work much slower. |
276 int GetScriptLineNumberSafe(Handle<Script> script, int code_position); | 281 int GetScriptLineNumberSafe(Handle<Script> script, int code_position); |
277 | 282 |
278 // Computes the enumerable keys from interceptors. Used for debug mirrors and | 283 // Computes the enumerable keys from interceptors. Used for debug mirrors and |
279 // by GetKeysInFixedArrayFor below. | 284 // by GetKeysInFixedArrayFor below. |
280 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, | 285 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, |
281 Handle<JSObject> object); | 286 Handle<JSObject> object); |
282 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, | 287 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, |
283 Handle<JSObject> object); | 288 Handle<JSObject> object); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 private: | 376 private: |
372 bool has_been_transformed_; // Tells whether the object has been transformed. | 377 bool has_been_transformed_; // Tells whether the object has been transformed. |
373 int unused_property_fields_; // Captures the unused number of field. | 378 int unused_property_fields_; // Captures the unused number of field. |
374 Handle<JSObject> object_; // The object being optimized. | 379 Handle<JSObject> object_; // The object being optimized. |
375 }; | 380 }; |
376 | 381 |
377 | 382 |
378 } } // namespace v8::internal | 383 } } // namespace v8::internal |
379 | 384 |
380 #endif // V8_HANDLES_H_ | 385 #endif // V8_HANDLES_H_ |
OLD | NEW |