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

Side by Side Diff: src/ic.cc

Issue 258243003: Remove old-style accessor support from runtime. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comment Created 6 years, 7 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/accessors.cc ('k') | src/objects.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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 } 1024 }
1025 CallOptimization call_optimization(function); 1025 CallOptimization call_optimization(function);
1026 if (call_optimization.is_simple_api_call() && 1026 if (call_optimization.is_simple_api_call() &&
1027 call_optimization.IsCompatibleReceiver(object, holder)) { 1027 call_optimization.IsCompatibleReceiver(object, holder)) {
1028 return compiler.CompileLoadCallback( 1028 return compiler.CompileLoadCallback(
1029 type, holder, name, call_optimization); 1029 type, holder, name, call_optimization);
1030 } 1030 }
1031 return compiler.CompileLoadViaGetter(type, holder, name, function); 1031 return compiler.CompileLoadViaGetter(type, holder, name, function);
1032 } 1032 }
1033 // TODO(dcarney): Handle correctly. 1033 // TODO(dcarney): Handle correctly.
1034 if (callback->IsDeclaredAccessorInfo()) break; 1034 ASSERT(callback->IsDeclaredAccessorInfo());
1035 ASSERT(callback->IsForeign());
1036 // No IC support for old-style native accessors.
1037 break; 1035 break;
1038 } 1036 }
1039 case INTERCEPTOR: 1037 case INTERCEPTOR:
1040 ASSERT(HasInterceptorGetter(*holder)); 1038 ASSERT(HasInterceptorGetter(*holder));
1041 return compiler.CompileLoadInterceptor(type, holder, name); 1039 return compiler.CompileLoadInterceptor(type, holder, name);
1042 default: 1040 default:
1043 break; 1041 break;
1044 } 1042 }
1045 1043
1046 return slow_stub(); 1044 return slow_stub();
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 CallOptimization call_optimization(function); 1447 CallOptimization call_optimization(function);
1450 if (call_optimization.is_simple_api_call() && 1448 if (call_optimization.is_simple_api_call() &&
1451 call_optimization.IsCompatibleReceiver(receiver, holder)) { 1449 call_optimization.IsCompatibleReceiver(receiver, holder)) {
1452 return compiler.CompileStoreCallback( 1450 return compiler.CompileStoreCallback(
1453 receiver, holder, name, call_optimization); 1451 receiver, holder, name, call_optimization);
1454 } 1452 }
1455 return compiler.CompileStoreViaSetter( 1453 return compiler.CompileStoreViaSetter(
1456 receiver, holder, name, Handle<JSFunction>::cast(setter)); 1454 receiver, holder, name, Handle<JSFunction>::cast(setter));
1457 } 1455 }
1458 // TODO(dcarney): Handle correctly. 1456 // TODO(dcarney): Handle correctly.
1459 if (callback->IsDeclaredAccessorInfo()) break; 1457 ASSERT(callback->IsDeclaredAccessorInfo());
1460 ASSERT(callback->IsForeign());
1461
1462 // Use specialized code for setting the length of arrays with fast
1463 // properties. Slow properties might indicate redefinition of the length
1464 // property.
1465 if (receiver->IsJSArray() &&
1466 String::Equals(isolate()->factory()->length_string(), name) &&
1467 Handle<JSArray>::cast(receiver)->AllowsSetElementsLength() &&
1468 receiver->HasFastProperties()) {
1469 return compiler.CompileStoreArrayLength(receiver, lookup, name);
1470 }
1471
1472 // No IC support for old-style native accessors.
1473 break; 1458 break;
1474 } 1459 }
1475 case INTERCEPTOR: 1460 case INTERCEPTOR:
1476 if (kind() == Code::KEYED_STORE_IC) break; 1461 if (kind() == Code::KEYED_STORE_IC) break;
1477 ASSERT(HasInterceptorSetter(*holder)); 1462 ASSERT(HasInterceptorSetter(*holder));
1478 return compiler.CompileStoreInterceptor(receiver, name); 1463 return compiler.CompileStoreInterceptor(receiver, name);
1479 case CONSTANT: 1464 case CONSTANT:
1480 break; 1465 break;
1481 case NONEXISTENT: 1466 case NONEXISTENT:
1482 case HANDLER: 1467 case HANDLER:
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
2947 #undef ADDR 2932 #undef ADDR
2948 }; 2933 };
2949 2934
2950 2935
2951 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2936 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2952 return IC_utilities[id]; 2937 return IC_utilities[id];
2953 } 2938 }
2954 2939
2955 2940
2956 } } // namespace v8::internal 2941 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698