| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 Handle<Object> ForceDeleteProperty(Handle<JSObject> object, | 304 Handle<Object> ForceDeleteProperty(Handle<JSObject> object, |
| 305 Handle<Object> key) { | 305 Handle<Object> key) { |
| 306 Isolate* isolate = object->GetIsolate(); | 306 Isolate* isolate = object->GetIsolate(); |
| 307 CALL_HEAP_FUNCTION(isolate, | 307 CALL_HEAP_FUNCTION(isolate, |
| 308 Runtime::ForceDeleteObjectProperty(isolate, object, key), | 308 Runtime::ForceDeleteObjectProperty(isolate, object, key), |
| 309 Object); | 309 Object); |
| 310 } | 310 } |
| 311 | 311 |
| 312 | 312 |
| 313 Handle<Object> IgnoreAttributesAndSetLocalProperty( | 313 Handle<Object> SetLocalPropertyIgnoreAttributes( |
| 314 Handle<JSObject> object, | 314 Handle<JSObject> object, |
| 315 Handle<String> key, | 315 Handle<String> key, |
| 316 Handle<Object> value, | 316 Handle<Object> value, |
| 317 PropertyAttributes attributes) { | 317 PropertyAttributes attributes) { |
| 318 CALL_HEAP_FUNCTION( | 318 CALL_HEAP_FUNCTION( |
| 319 object->GetIsolate(), | 319 object->GetIsolate(), |
| 320 object->IgnoreAttributesAndSetLocalProperty(*key, *value, attributes), | 320 object->SetLocalPropertyIgnoreAttributes(*key, *value, attributes), |
| 321 Object); | 321 Object); |
| 322 } | 322 } |
| 323 | 323 |
| 324 | 324 |
| 325 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object, | 325 Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object, |
| 326 Handle<String> key, | 326 Handle<String> key, |
| 327 Handle<Object> value, | 327 Handle<Object> value, |
| 328 PropertyAttributes attributes) { | 328 PropertyAttributes attributes) { |
| 329 CALL_HEAP_FUNCTION(object->GetIsolate(), | 329 CALL_HEAP_FUNCTION(object->GetIsolate(), |
| 330 object->SetPropertyWithInterceptor(*key, | 330 object->SetPropertyWithInterceptor(*key, |
| 331 *value, | 331 *value, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 Handle<Object> number = Execution::ToNumber(value, &has_exception); | 465 Handle<Object> number = Execution::ToNumber(value, &has_exception); |
| 466 if (has_exception) return Handle<Object>(); | 466 if (has_exception) return Handle<Object>(); |
| 467 value = number; | 467 value = number; |
| 468 } | 468 } |
| 469 } | 469 } |
| 470 CALL_HEAP_FUNCTION(object->GetIsolate(), | 470 CALL_HEAP_FUNCTION(object->GetIsolate(), |
| 471 object->SetElement(index, *value), Object); | 471 object->SetElement(index, *value), Object); |
| 472 } | 472 } |
| 473 | 473 |
| 474 | 474 |
| 475 Handle<Object> SetOwnElement(Handle<JSObject> object, |
| 476 uint32_t index, |
| 477 Handle<Object> value) { |
| 478 ASSERT(!object->HasPixelElements()); |
| 479 ASSERT(!object->HasExternalArrayElements()); |
| 480 CALL_HEAP_FUNCTION(object->GetIsolate(), |
| 481 object->SetElement(index, *value, false), |
| 482 Object); |
| 483 } |
| 484 |
| 485 |
| 475 Handle<JSObject> Copy(Handle<JSObject> obj) { | 486 Handle<JSObject> Copy(Handle<JSObject> obj) { |
| 476 Isolate* isolate = obj->GetIsolate(); | 487 Isolate* isolate = obj->GetIsolate(); |
| 477 CALL_HEAP_FUNCTION(isolate, | 488 CALL_HEAP_FUNCTION(isolate, |
| 478 isolate->heap()->CopyJSObject(*obj), JSObject); | 489 isolate->heap()->CopyJSObject(*obj), JSObject); |
| 479 } | 490 } |
| 480 | 491 |
| 481 | 492 |
| 482 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { | 493 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { |
| 483 CALL_HEAP_FUNCTION(obj->GetIsolate(), obj->DefineAccessor(*info), Object); | 494 CALL_HEAP_FUNCTION(obj->GetIsolate(), obj->DefineAccessor(*info), Object); |
| 484 } | 495 } |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 965 |
| 955 OptimizedObjectForAddingMultipleProperties:: | 966 OptimizedObjectForAddingMultipleProperties:: |
| 956 ~OptimizedObjectForAddingMultipleProperties() { | 967 ~OptimizedObjectForAddingMultipleProperties() { |
| 957 // Reoptimize the object to allow fast property access. | 968 // Reoptimize the object to allow fast property access. |
| 958 if (has_been_transformed_) { | 969 if (has_been_transformed_) { |
| 959 TransformToFastProperties(object_, unused_property_fields_); | 970 TransformToFastProperties(object_, unused_property_fields_); |
| 960 } | 971 } |
| 961 } | 972 } |
| 962 | 973 |
| 963 } } // namespace v8::internal | 974 } } // namespace v8::internal |
| OLD | NEW |