OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2750 "length exceeds max acceptable value")) { | 2750 "length exceeds max acceptable value")) { |
2751 return; | 2751 return; |
2752 } | 2752 } |
2753 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2753 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
2754 if (!ApiCheck(!self->IsJSArray(), | 2754 if (!ApiCheck(!self->IsJSArray(), |
2755 "v8::Object::SetIndexedPropertiesToPixelData()", | 2755 "v8::Object::SetIndexedPropertiesToPixelData()", |
2756 "JSArray is not supported")) { | 2756 "JSArray is not supported")) { |
2757 return; | 2757 return; |
2758 } | 2758 } |
2759 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data); | 2759 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data); |
2760 i::Handle<i::Map> slow_map = | 2760 i::Handle<i::Map> pixel_array_map = |
2761 i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map())); | 2761 i::Factory::GetPixelArrayElementsMap(i::Handle<i::Map>(self->map())); |
2762 self->set_map(*slow_map); | 2762 self->set_map(*pixel_array_map); |
2763 self->set_elements(*pixels); | 2763 self->set_elements(*pixels); |
2764 } | 2764 } |
2765 | 2765 |
2766 | 2766 |
2767 bool v8::Object::HasIndexedPropertiesInPixelData() { | 2767 bool v8::Object::HasIndexedPropertiesInPixelData() { |
2768 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false); | 2768 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false); |
2769 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2769 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
2770 return self->HasPixelElements(); | 2770 return self->HasPixelElements(); |
2771 } | 2771 } |
2772 | 2772 |
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5168 | 5168 |
5169 | 5169 |
5170 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5170 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
5171 HandleScopeImplementer* thread_local = | 5171 HandleScopeImplementer* thread_local = |
5172 reinterpret_cast<HandleScopeImplementer*>(storage); | 5172 reinterpret_cast<HandleScopeImplementer*>(storage); |
5173 thread_local->IterateThis(v); | 5173 thread_local->IterateThis(v); |
5174 return storage + ArchiveSpacePerThread(); | 5174 return storage + ArchiveSpacePerThread(); |
5175 } | 5175 } |
5176 | 5176 |
5177 } } // namespace v8::internal | 5177 } } // namespace v8::internal |
OLD | NEW |