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

Side by Side Diff: src/ic.cc

Issue 6478027: Implement specialized IC code stubs for pixel array stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge with latest 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 | « src/ia32/stub-cache-ia32.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 return receiver->SetProperty(*name, *value, NONE); 1625 return receiver->SetProperty(*name, *value, NONE);
1626 } 1626 }
1627 1627
1628 // Do not use ICs for objects that require access checks (including 1628 // Do not use ICs for objects that require access checks (including
1629 // the global object). 1629 // the global object).
1630 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded(); 1630 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded();
1631 ASSERT(!(use_ic && object->IsJSGlobalProxy())); 1631 ASSERT(!(use_ic && object->IsJSGlobalProxy()));
1632 1632
1633 if (use_ic) { 1633 if (use_ic) {
1634 Code* stub = generic_stub(); 1634 Code* stub = generic_stub();
1635 if (object->IsJSObject()) { 1635 if (state == UNINITIALIZED) {
1636 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 1636 if (object->IsJSObject()) {
1637 if (receiver->HasExternalArrayElements()) { 1637 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
1638 MaybeObject* probe = 1638 if (receiver->HasExternalArrayElements()) {
1639 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, true); 1639 MaybeObject* probe =
1640 stub = 1640 StubCache::ComputeKeyedLoadOrStoreExternalArray(*receiver, true);
1641 probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked()); 1641 stub = probe->IsFailure() ?
1642 } else if (state == UNINITIALIZED && 1642 NULL : Code::cast(probe->ToObjectUnchecked());
1643 key->IsSmi() && 1643 } else if (receiver->HasPixelElements()) {
1644 receiver->map()->has_fast_elements()) { 1644 MaybeObject* probe =
1645 MaybeObject* probe = StubCache::ComputeKeyedStoreSpecialized(*receiver); 1645 StubCache::ComputeKeyedStorePixelArray(*receiver);
1646 stub = 1646 stub = probe->IsFailure() ?
1647 probe->IsFailure() ? NULL : Code::cast(probe->ToObjectUnchecked()); 1647 NULL : Code::cast(probe->ToObjectUnchecked());
1648 } else if (key->IsSmi() && receiver->map()->has_fast_elements()) {
1649 MaybeObject* probe =
1650 StubCache::ComputeKeyedStoreSpecialized(*receiver);
1651 stub = probe->IsFailure() ?
1652 NULL : Code::cast(probe->ToObjectUnchecked());
1653 }
1648 } 1654 }
1649 } 1655 }
1650 if (stub != NULL) set_target(stub); 1656 if (stub != NULL) set_target(stub);
1651 } 1657 }
1652 1658
1653 // Set the property. 1659 // Set the property.
1654 return Runtime::SetObjectProperty(object, key, value, NONE); 1660 return Runtime::SetObjectProperty(object, key, value, NONE);
1655 } 1661 }
1656 1662
1657 1663
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2280 #undef ADDR 2286 #undef ADDR
2281 }; 2287 };
2282 2288
2283 2289
2284 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2290 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2285 return IC_utilities[id]; 2291 return IC_utilities[id];
2286 } 2292 }
2287 2293
2288 2294
2289 } } // namespace v8::internal 2295 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698