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

Side by Side Diff: src/ic.cc

Issue 150101: Tweaks to global object inline cache code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 630 }
631 case NORMAL: { 631 case NORMAL: {
632 if (object->IsJSGlobalObject()) { 632 if (object->IsJSGlobalObject()) {
633 // The stub generated for the global object picks the value directly 633 // The stub generated for the global object picks the value directly
634 // from the property cell. So the property must be directly on the 634 // from the property cell. So the property must be directly on the
635 // global object. 635 // global object.
636 Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(object); 636 Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(object);
637 if (lookup->holder() != *global) return; 637 if (lookup->holder() != *global) return;
638 JSGlobalPropertyCell* cell = 638 JSGlobalPropertyCell* cell =
639 JSGlobalPropertyCell::cast(global->GetPropertyCell(lookup)); 639 JSGlobalPropertyCell::cast(global->GetPropertyCell(lookup));
640 code = StubCache::ComputeLoadGlobal(*name, *global, cell); 640 code = StubCache::ComputeLoadGlobal(*name, *global,
641 cell, lookup->IsDontDelete());
641 } else { 642 } else {
642 // There is only one shared stub for loading normalized 643 // There is only one shared stub for loading normalized
643 // properties. It does not traverse the prototype chain, so the 644 // properties. It does not traverse the prototype chain, so the
644 // property must be found in the receiver for the stub to be 645 // property must be found in the receiver for the stub to be
645 // applicable. 646 // applicable.
646 if (lookup->holder() != *receiver) return; 647 if (lookup->holder() != *receiver) return;
647 code = StubCache::ComputeLoadNormal(*name, *receiver); 648 code = StubCache::ComputeLoadNormal(*name, *receiver);
648 } 649 }
649 break; 650 break;
650 } 651 }
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 #undef ADDR 1324 #undef ADDR
1324 }; 1325 };
1325 1326
1326 1327
1327 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1328 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1328 return IC_utilities[id]; 1329 return IC_utilities[id];
1329 } 1330 }
1330 1331
1331 1332
1332 } } // namespace v8::internal 1333 } } // 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