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

Side by Side Diff: src/ic.cc

Issue 226053002: Fix for v8:3255 Grow KeyedStoreIC doesn't respect String value wrappers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 Handle<Code> stub = generic_stub(); 1736 Handle<Code> stub = generic_stub();
1737 1737
1738 if (key->IsInternalizedString()) { 1738 if (key->IsInternalizedString()) {
1739 maybe_object = StoreIC::Store(object, 1739 maybe_object = StoreIC::Store(object,
1740 Handle<String>::cast(key), 1740 Handle<String>::cast(key),
1741 value, 1741 value,
1742 JSReceiver::MAY_BE_STORE_FROM_KEYED); 1742 JSReceiver::MAY_BE_STORE_FROM_KEYED);
1743 if (maybe_object->IsFailure()) return maybe_object; 1743 if (maybe_object->IsFailure()) return maybe_object;
1744 } else { 1744 } else {
1745 bool use_ic = FLAG_use_ic && 1745 bool use_ic = FLAG_use_ic &&
1746 !object->IsStringWrapper() &&
1746 !object->IsAccessCheckNeeded() && 1747 !object->IsAccessCheckNeeded() &&
1747 !object->IsJSGlobalProxy() && 1748 !object->IsJSGlobalProxy() &&
1748 !(object->IsJSObject() && 1749 !(object->IsJSObject() &&
1749 JSObject::cast(*object)->map()->is_observed()); 1750 JSObject::cast(*object)->map()->is_observed());
1750 if (use_ic && !object->IsSmi()) { 1751 if (use_ic && !object->IsSmi()) {
1751 // Don't use ICs for maps of the objects in Array's prototype chain. We 1752 // Don't use ICs for maps of the objects in Array's prototype chain. We
1752 // expect to be able to trap element sets to objects with those maps in 1753 // expect to be able to trap element sets to objects with those maps in
1753 // the runtime to enable optimization of element hole access. 1754 // the runtime to enable optimization of element hole access.
1754 Handle<HeapObject> heap_object = Handle<HeapObject>::cast(object); 1755 Handle<HeapObject> heap_object = Handle<HeapObject>::cast(object);
1755 if (heap_object->map()->IsMapInArrayPrototypeChain()) use_ic = false; 1756 if (heap_object->map()->IsMapInArrayPrototypeChain()) use_ic = false;
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 #undef ADDR 3000 #undef ADDR
3000 }; 3001 };
3001 3002
3002 3003
3003 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3004 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3004 return IC_utilities[id]; 3005 return IC_utilities[id];
3005 } 3006 }
3006 3007
3007 3008
3008 } } // namespace v8::internal 3009 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-3255.js » ('j') | test/mjsunit/regress/regress-3255.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698