| 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 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2599 "length exceeds max acceptable value")) { | 2599 "length exceeds max acceptable value")) { |
| 2600 return; | 2600 return; |
| 2601 } | 2601 } |
| 2602 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2602 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2603 if (!ApiCheck(!self->IsJSArray(), | 2603 if (!ApiCheck(!self->IsJSArray(), |
| 2604 "v8::Object::SetIndexedPropertiesToPixelData()", | 2604 "v8::Object::SetIndexedPropertiesToPixelData()", |
| 2605 "JSArray is not supported")) { | 2605 "JSArray is not supported")) { |
| 2606 return; | 2606 return; |
| 2607 } | 2607 } |
| 2608 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data); | 2608 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data); |
| 2609 self->set_map( |
| 2610 *i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map()))); |
| 2609 self->set_elements(*pixels); | 2611 self->set_elements(*pixels); |
| 2610 } | 2612 } |
| 2611 | 2613 |
| 2612 | 2614 |
| 2613 bool v8::Object::HasIndexedPropertiesInPixelData() { | 2615 bool v8::Object::HasIndexedPropertiesInPixelData() { |
| 2614 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false); | 2616 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false); |
| 2615 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2617 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2616 return self->HasPixelElements(); | 2618 return self->HasPixelElements(); |
| 2617 } | 2619 } |
| 2618 | 2620 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2652 return; | 2654 return; |
| 2653 } | 2655 } |
| 2654 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2656 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2655 if (!ApiCheck(!self->IsJSArray(), | 2657 if (!ApiCheck(!self->IsJSArray(), |
| 2656 "v8::Object::SetIndexedPropertiesToExternalArrayData()", | 2658 "v8::Object::SetIndexedPropertiesToExternalArrayData()", |
| 2657 "JSArray is not supported")) { | 2659 "JSArray is not supported")) { |
| 2658 return; | 2660 return; |
| 2659 } | 2661 } |
| 2660 i::Handle<i::ExternalArray> array = | 2662 i::Handle<i::ExternalArray> array = |
| 2661 i::Factory::NewExternalArray(length, array_type, data); | 2663 i::Factory::NewExternalArray(length, array_type, data); |
| 2664 self->set_map( |
| 2665 *i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map()))); |
| 2662 self->set_elements(*array); | 2666 self->set_elements(*array); |
| 2663 } | 2667 } |
| 2664 | 2668 |
| 2665 | 2669 |
| 2666 bool v8::Object::HasIndexedPropertiesInExternalArrayData() { | 2670 bool v8::Object::HasIndexedPropertiesInExternalArrayData() { |
| 2667 ON_BAILOUT("v8::HasIndexedPropertiesInExternalArrayData()", return false); | 2671 ON_BAILOUT("v8::HasIndexedPropertiesInExternalArrayData()", return false); |
| 2668 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2672 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2669 return self->HasExternalArrayElements(); | 2673 return self->HasExternalArrayElements(); |
| 2670 } | 2674 } |
| 2671 | 2675 |
| (...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4713 | 4717 |
| 4714 | 4718 |
| 4715 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4719 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 4716 HandleScopeImplementer* thread_local = | 4720 HandleScopeImplementer* thread_local = |
| 4717 reinterpret_cast<HandleScopeImplementer*>(storage); | 4721 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 4718 thread_local->IterateThis(v); | 4722 thread_local->IterateThis(v); |
| 4719 return storage + ArchiveSpacePerThread(); | 4723 return storage + ArchiveSpacePerThread(); |
| 4720 } | 4724 } |
| 4721 | 4725 |
| 4722 } } // namespace v8::internal | 4726 } } // namespace v8::internal |
| OLD | NEW |