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

Side by Side Diff: src/ic.cc

Issue 23453019: Allow uncacheable identifiers to go generic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 7 years, 3 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/objects.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 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 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 if (LookupForWrite(receiver, name, value, &lookup, &state)) { 1712 if (LookupForWrite(receiver, name, value, &lookup, &state)) {
1713 if (FLAG_use_ic) { 1713 if (FLAG_use_ic) {
1714 UpdateCaches(&lookup, state, strict_mode, receiver, name, value); 1714 UpdateCaches(&lookup, state, strict_mode, receiver, name, value);
1715 } 1715 }
1716 } else if (strict_mode == kStrictMode && 1716 } else if (strict_mode == kStrictMode &&
1717 !(lookup.IsProperty() && lookup.IsReadOnly()) && 1717 !(lookup.IsProperty() && lookup.IsReadOnly()) &&
1718 IsUndeclaredGlobal(object)) { 1718 IsUndeclaredGlobal(object)) {
1719 // Strict mode doesn't allow setting non-existent global property. 1719 // Strict mode doesn't allow setting non-existent global property.
1720 return ReferenceError("not_defined", name); 1720 return ReferenceError("not_defined", name);
1721 } else if (FLAG_use_ic && 1721 } else if (FLAG_use_ic &&
1722 (lookup.IsNormal() || 1722 (!name->IsCacheable(isolate()) ||
1723 lookup.IsNormal() ||
1723 (lookup.IsField() && lookup.CanHoldValue(value)))) { 1724 (lookup.IsField() && lookup.CanHoldValue(value)))) {
1724 Handle<Code> stub = strict_mode == kStrictMode 1725 Handle<Code> stub = strict_mode == kStrictMode
1725 ? generic_stub_strict() : generic_stub(); 1726 ? generic_stub_strict() : generic_stub();
1726 set_target(*stub); 1727 set_target(*stub);
1727 } 1728 }
1728 1729
1729 // Set the property. 1730 // Set the property.
1730 return JSReceiver::SetPropertyOrFail( 1731 return JSReceiver::SetPropertyOrFail(
1731 receiver, name, value, NONE, strict_mode, store_mode); 1732 receiver, name, value, NONE, strict_mode, store_mode);
1732 } 1733 }
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
3094 #undef ADDR 3095 #undef ADDR
3095 }; 3096 };
3096 3097
3097 3098
3098 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3099 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3099 return IC_utilities[id]; 3100 return IC_utilities[id];
3100 } 3101 }
3101 3102
3102 3103
3103 } } // namespace v8::internal 3104 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698