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 404 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() || object->HasExternalArrayElements())); | |
fschneider
2011/01/06 13:36:24
I like to split asserts so that there is only one
Lasse Reichstein
2011/01/06 13:55:51
Done.
| |
429 CALL_HEAP_FUNCTION(object->SetElement(index, *value, false), Object); | |
430 } | |
431 | |
432 | |
425 Handle<JSObject> Copy(Handle<JSObject> obj) { | 433 Handle<JSObject> Copy(Handle<JSObject> obj) { |
426 CALL_HEAP_FUNCTION(Heap::CopyJSObject(*obj), JSObject); | 434 CALL_HEAP_FUNCTION(Heap::CopyJSObject(*obj), JSObject); |
427 } | 435 } |
428 | 436 |
429 | 437 |
430 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { | 438 Handle<Object> SetAccessor(Handle<JSObject> obj, Handle<AccessorInfo> info) { |
431 CALL_HEAP_FUNCTION(obj->DefineAccessor(*info), Object); | 439 CALL_HEAP_FUNCTION(obj->DefineAccessor(*info), Object); |
432 } | 440 } |
433 | 441 |
434 | 442 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
882 | 890 |
883 OptimizedObjectForAddingMultipleProperties:: | 891 OptimizedObjectForAddingMultipleProperties:: |
884 ~OptimizedObjectForAddingMultipleProperties() { | 892 ~OptimizedObjectForAddingMultipleProperties() { |
885 // Reoptimize the object to allow fast property access. | 893 // Reoptimize the object to allow fast property access. |
886 if (has_been_transformed_) { | 894 if (has_been_transformed_) { |
887 TransformToFastProperties(object_, unused_property_fields_); | 895 TransformToFastProperties(object_, unused_property_fields_); |
888 } | 896 } |
889 } | 897 } |
890 | 898 |
891 } } // namespace v8::internal | 899 } } // namespace v8::internal |
OLD | NEW |