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

Side by Side Diff: src/ic.cc

Issue 17064002: Refactor only: Rename JSGlobaPropertyCell to PropertyCell (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/mark-compact.cc » ('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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 return isolate()->stub_cache()->ComputeCallConstant( 679 return isolate()->stub_cache()->ComputeCallConstant(
680 argc, kind_, extra_state, name, object, holder, function); 680 argc, kind_, extra_state, name, object, holder, function);
681 } 681 }
682 case NORMAL: { 682 case NORMAL: {
683 // If we return a null handle, the IC will not be patched. 683 // If we return a null handle, the IC will not be patched.
684 if (!object->IsJSObject()) return Handle<Code>::null(); 684 if (!object->IsJSObject()) return Handle<Code>::null();
685 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 685 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
686 686
687 if (holder->IsGlobalObject()) { 687 if (holder->IsGlobalObject()) {
688 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder); 688 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
689 Handle<JSGlobalPropertyCell> cell( 689 Handle<PropertyCell> cell(
690 global->GetPropertyCell(lookup), isolate()); 690 global->GetPropertyCell(lookup), isolate());
691 if (!cell->value()->IsJSFunction()) return Handle<Code>::null(); 691 if (!cell->value()->IsJSFunction()) return Handle<Code>::null();
692 Handle<JSFunction> function(JSFunction::cast(cell->value())); 692 Handle<JSFunction> function(JSFunction::cast(cell->value()));
693 return isolate()->stub_cache()->ComputeCallGlobal( 693 return isolate()->stub_cache()->ComputeCallGlobal(
694 argc, kind_, extra_state, name, receiver, global, cell, function); 694 argc, kind_, extra_state, name, receiver, global, cell, function);
695 } else { 695 } else {
696 // There is only one shared stub for calling normalized 696 // There is only one shared stub for calling normalized
697 // properties. It does not traverse the prototype chain, so the 697 // properties. It does not traverse the prototype chain, so the
698 // property must be found in the receiver for the stub to be 698 // property must be found in the receiver for the stub to be
699 // applicable. 699 // applicable.
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 name, receiver, holder, 1250 name, receiver, holder,
1251 lookup->GetFieldIndex(), lookup->representation()); 1251 lookup->GetFieldIndex(), lookup->representation());
1252 case CONSTANT_FUNCTION: { 1252 case CONSTANT_FUNCTION: {
1253 Handle<JSFunction> constant(lookup->GetConstantFunction()); 1253 Handle<JSFunction> constant(lookup->GetConstantFunction());
1254 return isolate()->stub_cache()->ComputeLoadConstant( 1254 return isolate()->stub_cache()->ComputeLoadConstant(
1255 name, receiver, holder, constant); 1255 name, receiver, holder, constant);
1256 } 1256 }
1257 case NORMAL: 1257 case NORMAL:
1258 if (holder->IsGlobalObject()) { 1258 if (holder->IsGlobalObject()) {
1259 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder); 1259 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
1260 Handle<JSGlobalPropertyCell> cell( 1260 Handle<PropertyCell> cell(
1261 global->GetPropertyCell(lookup), isolate()); 1261 global->GetPropertyCell(lookup), isolate());
1262 return isolate()->stub_cache()->ComputeLoadGlobal( 1262 return isolate()->stub_cache()->ComputeLoadGlobal(
1263 name, receiver, global, cell, lookup->IsDontDelete()); 1263 name, receiver, global, cell, lookup->IsDontDelete());
1264 } 1264 }
1265 // There is only one shared stub for loading normalized 1265 // There is only one shared stub for loading normalized
1266 // properties. It does not traverse the prototype chain, so the 1266 // properties. It does not traverse the prototype chain, so the
1267 // property must be found in the receiver for the stub to be 1267 // property must be found in the receiver for the stub to be
1268 // applicable. 1268 // applicable.
1269 if (!holder.is_identical_to(receiver)) break; 1269 if (!holder.is_identical_to(receiver)) break;
1270 return isolate()->stub_cache()->ComputeLoadNormal(name, receiver); 1270 return isolate()->stub_cache()->ComputeLoadNormal(name, receiver);
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 switch (lookup->type()) { 1677 switch (lookup->type()) {
1678 case FIELD: 1678 case FIELD:
1679 return isolate()->stub_cache()->ComputeStoreField( 1679 return isolate()->stub_cache()->ComputeStoreField(
1680 name, receiver, lookup, strict_mode); 1680 name, receiver, lookup, strict_mode);
1681 case NORMAL: 1681 case NORMAL:
1682 if (receiver->IsGlobalObject()) { 1682 if (receiver->IsGlobalObject()) {
1683 // The stub generated for the global object picks the value directly 1683 // The stub generated for the global object picks the value directly
1684 // from the property cell. So the property must be directly on the 1684 // from the property cell. So the property must be directly on the
1685 // global object. 1685 // global object.
1686 Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver); 1686 Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
1687 Handle<JSGlobalPropertyCell> cell( 1687 Handle<PropertyCell> cell(
1688 global->GetPropertyCell(lookup), isolate()); 1688 global->GetPropertyCell(lookup), isolate());
1689 return isolate()->stub_cache()->ComputeStoreGlobal( 1689 return isolate()->stub_cache()->ComputeStoreGlobal(
1690 name, global, cell, strict_mode); 1690 name, global, cell, strict_mode);
1691 } 1691 }
1692 ASSERT(holder.is_identical_to(receiver)); 1692 ASSERT(holder.is_identical_to(receiver));
1693 return isolate()->stub_cache()->ComputeStoreNormal(strict_mode); 1693 return isolate()->stub_cache()->ComputeStoreNormal(strict_mode);
1694 case CALLBACKS: { 1694 case CALLBACKS: {
1695 Handle<Object> callback(lookup->GetCallbackObject(), isolate()); 1695 Handle<Object> callback(lookup->GetCallbackObject(), isolate());
1696 if (callback->IsExecutableAccessorInfo()) { 1696 if (callback->IsExecutableAccessorInfo()) {
1697 Handle<ExecutableAccessorInfo> info = 1697 Handle<ExecutableAccessorInfo> info =
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
3052 #undef ADDR 3052 #undef ADDR
3053 }; 3053 };
3054 3054
3055 3055
3056 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3056 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3057 return IC_utilities[id]; 3057 return IC_utilities[id];
3058 } 3058 }
3059 3059
3060 3060
3061 } } // namespace v8::internal 3061 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698