Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: src/api.cc

Issue 6410112: Implement crankshaft support for pixel array loads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ia32 working Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ast.h » ('j') | src/ast.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after
2742 "length exceeds max acceptable value")) { 2742 "length exceeds max acceptable value")) {
2743 return; 2743 return;
2744 } 2744 }
2745 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 2745 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2746 if (!ApiCheck(!self->IsJSArray(), 2746 if (!ApiCheck(!self->IsJSArray(),
2747 "v8::Object::SetIndexedPropertiesToPixelData()", 2747 "v8::Object::SetIndexedPropertiesToPixelData()",
2748 "JSArray is not supported")) { 2748 "JSArray is not supported")) {
2749 return; 2749 return;
2750 } 2750 }
2751 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data); 2751 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data);
2752 i::Handle<i::Map> slow_map = 2752 i::Handle<i::Map> pixel_array_map =
2753 i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map())); 2753 i::Factory::GetPixelArrayElementsMap(i::Handle<i::Map>(self->map()));
2754 self->set_map(*slow_map); 2754 self->set_map(*pixel_array_map);
2755 self->set_elements(*pixels); 2755 self->set_elements(*pixels);
2756 } 2756 }
2757 2757
2758 2758
2759 bool v8::Object::HasIndexedPropertiesInPixelData() { 2759 bool v8::Object::HasIndexedPropertiesInPixelData() {
2760 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false); 2760 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false);
2761 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 2761 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
2762 return self->HasPixelElements(); 2762 return self->HasPixelElements();
2763 } 2763 }
2764 2764
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after
5160 5160
5161 5161
5162 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 5162 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
5163 HandleScopeImplementer* thread_local = 5163 HandleScopeImplementer* thread_local =
5164 reinterpret_cast<HandleScopeImplementer*>(storage); 5164 reinterpret_cast<HandleScopeImplementer*>(storage);
5165 thread_local->IterateThis(v); 5165 thread_local->IterateThis(v);
5166 return storage + ArchiveSpacePerThread(); 5166 return storage + ArchiveSpacePerThread();
5167 } 5167 }
5168 5168
5169 } } // namespace v8::internal 5169 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ast.h » ('j') | src/ast.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698