OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 Object); | 273 Object); |
274 } | 274 } |
275 | 275 |
276 | 276 |
277 Handle<Object> ForceDeleteProperty(Handle<JSObject> object, | 277 Handle<Object> ForceDeleteProperty(Handle<JSObject> object, |
278 Handle<Object> key) { | 278 Handle<Object> key) { |
279 CALL_HEAP_FUNCTION(Runtime::ForceDeleteObjectProperty(object, key), Object); | 279 CALL_HEAP_FUNCTION(Runtime::ForceDeleteObjectProperty(object, key), Object); |
280 } | 280 } |
281 | 281 |
282 | 282 |
283 Handle<Object> IgnoreAttributesAndSetLocalProperty( | 283 Handle<Object> SetLocalPropertyIgnoreAttributes( |
284 Handle<JSObject> object, | 284 Handle<JSObject> object, |
285 Handle<String> key, | 285 Handle<String> key, |
286 Handle<Object> value, | 286 Handle<Object> value, |
287 PropertyAttributes attributes) { | 287 PropertyAttributes attributes) { |
288 CALL_HEAP_FUNCTION(object-> | 288 CALL_HEAP_FUNCTION(object-> |
289 IgnoreAttributesAndSetLocalProperty(*key, *value, attributes), Object); | 289 SetLocalPropertyIgnoreAttributes(*key, *value, attributes), Object); |
290 } | 290 } |
291 | 291 |
292 | 292 |
293 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object, | 293 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object, |
294 Handle<String> key, | 294 Handle<String> key, |
295 Handle<Object> value, | 295 Handle<Object> value, |
296 PropertyAttributes attributes) { | 296 PropertyAttributes attributes) { |
297 CALL_HEAP_FUNCTION(object->SetPropertyWithInterceptor(*key, | 297 CALL_HEAP_FUNCTION(object->SetPropertyWithInterceptor(*key, |
298 *value, | 298 *value, |
299 attributes), | 299 attributes), |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 bool has_exception; | 415 bool has_exception; |
416 Handle<Object> number = Execution::ToNumber(value, &has_exception); | 416 Handle<Object> number = Execution::ToNumber(value, &has_exception); |
417 if (has_exception) return Handle<Object>(); | 417 if (has_exception) return Handle<Object>(); |
418 value = number; | 418 value = number; |
419 } | 419 } |
420 } | 420 } |
421 CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object); | 421 CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object); |
422 } | 422 } |
423 | 423 |
424 | 424 |
| 425 Handle<Object> SetOwnElement(Handle<JSObject> object, |
| 426 uint32_t index, |
| 427 Handle<Object> value) { |
| 428 ASSERT(!object->HasPixelElements()); |
| 429 ASSERT(!object->HasExternalArrayElements()); |
| 430 CALL_HEAP_FUNCTION(object->SetElement(index, *value, false), Object); |
| 431 } |
| 432 |
| 433 |
425 Handle<JSObject> Copy(Handle<JSObject> obj) { | 434 Handle<JSObject> Copy(Handle<JSObject> obj) { |
426 CALL_HEAP_FUNCTION(Heap::CopyJSObject(*obj), JSObject); | 435 CALL_HEAP_FUNCTION(Heap::CopyJSObject(*obj), JSObject); |
427 } | 436 } |
428 | 437 |
429 | 438 |
430 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { | 439 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { |
431 CALL_HEAP_FUNCTION(obj->DefineAccessor(*info), Object); | 440 CALL_HEAP_FUNCTION(obj->DefineAccessor(*info), Object); |
432 } | 441 } |
433 | 442 |
434 | 443 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 | 891 |
883 OptimizedObjectForAddingMultipleProperties:: | 892 OptimizedObjectForAddingMultipleProperties:: |
884 ~OptimizedObjectForAddingMultipleProperties() { | 893 ~OptimizedObjectForAddingMultipleProperties() { |
885 // Reoptimize the object to allow fast property access. | 894 // Reoptimize the object to allow fast property access. |
886 if (has_been_transformed_) { | 895 if (has_been_transformed_) { |
887 TransformToFastProperties(object_, unused_property_fields_); | 896 TransformToFastProperties(object_, unused_property_fields_); |
888 } | 897 } |
889 } | 898 } |
890 | 899 |
891 } } // namespace v8::internal | 900 } } // namespace v8::internal |
OLD | NEW |