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

Side by Side Diff: src/ic.cc

Issue 24200002: remove js_accessor_ics flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: func rename 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 | « src/flag-definitions.h ('k') | test/cctest/test-accessors.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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 name, receiver, holder, info); 1358 name, receiver, holder, info);
1359 } else if (callback->IsAccessorPair()) { 1359 } else if (callback->IsAccessorPair()) {
1360 Handle<Object> getter(Handle<AccessorPair>::cast(callback)->getter(), 1360 Handle<Object> getter(Handle<AccessorPair>::cast(callback)->getter(),
1361 isolate()); 1361 isolate());
1362 if (!getter->IsJSFunction()) break; 1362 if (!getter->IsJSFunction()) break;
1363 if (holder->IsGlobalObject()) break; 1363 if (holder->IsGlobalObject()) break;
1364 if (!holder->HasFastProperties()) break; 1364 if (!holder->HasFastProperties()) break;
1365 Handle<JSFunction> function = Handle<JSFunction>::cast(getter); 1365 Handle<JSFunction> function = Handle<JSFunction>::cast(getter);
1366 CallOptimization call_optimization(function); 1366 CallOptimization call_optimization(function);
1367 if (call_optimization.is_simple_api_call() && 1367 if (call_optimization.is_simple_api_call() &&
1368 call_optimization.IsCompatibleReceiver(*receiver) && 1368 call_optimization.IsCompatibleReceiver(*receiver)) {
1369 FLAG_js_accessor_ics) {
1370 return isolate()->stub_cache()->ComputeLoadCallback( 1369 return isolate()->stub_cache()->ComputeLoadCallback(
1371 name, receiver, holder, call_optimization); 1370 name, receiver, holder, call_optimization);
1372 } 1371 }
1373 return isolate()->stub_cache()->ComputeLoadViaGetter( 1372 return isolate()->stub_cache()->ComputeLoadViaGetter(
1374 name, receiver, holder, function); 1373 name, receiver, holder, function);
1375 } else if (receiver->IsJSArray() && 1374 } else if (receiver->IsJSArray() &&
1376 name->Equals(isolate()->heap()->length_string())) { 1375 name->Equals(isolate()->heap()->length_string())) {
1377 PropertyIndex lengthIndex = PropertyIndex::NewHeaderIndex( 1376 PropertyIndex lengthIndex = PropertyIndex::NewHeaderIndex(
1378 JSArray::kLengthOffset / kPointerSize); 1377 JSArray::kLengthOffset / kPointerSize);
1379 return isolate()->stub_cache()->ComputeLoadField( 1378 return isolate()->stub_cache()->ComputeLoadField(
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 } else if (callback_object->IsAccessorPair()) { 1569 } else if (callback_object->IsAccessorPair()) {
1571 Handle<Object> getter( 1570 Handle<Object> getter(
1572 Handle<AccessorPair>::cast(callback_object)->getter(), 1571 Handle<AccessorPair>::cast(callback_object)->getter(),
1573 isolate()); 1572 isolate());
1574 if (!getter->IsJSFunction()) break; 1573 if (!getter->IsJSFunction()) break;
1575 if (holder->IsGlobalObject()) break; 1574 if (holder->IsGlobalObject()) break;
1576 if (!holder->HasFastProperties()) break; 1575 if (!holder->HasFastProperties()) break;
1577 Handle<JSFunction> function = Handle<JSFunction>::cast(getter); 1576 Handle<JSFunction> function = Handle<JSFunction>::cast(getter);
1578 CallOptimization call_optimization(function); 1577 CallOptimization call_optimization(function);
1579 if (call_optimization.is_simple_api_call() && 1578 if (call_optimization.is_simple_api_call() &&
1580 call_optimization.IsCompatibleReceiver(*receiver) && 1579 call_optimization.IsCompatibleReceiver(*receiver)) {
1581 FLAG_js_accessor_ics) {
1582 return isolate()->stub_cache()->ComputeKeyedLoadCallback( 1580 return isolate()->stub_cache()->ComputeKeyedLoadCallback(
1583 name, receiver, holder, call_optimization); 1581 name, receiver, holder, call_optimization);
1584 } 1582 }
1585 } 1583 }
1586 break; 1584 break;
1587 } 1585 }
1588 case INTERCEPTOR: 1586 case INTERCEPTOR:
1589 ASSERT(HasInterceptorGetter(lookup->holder())); 1587 ASSERT(HasInterceptorGetter(lookup->holder()));
1590 return isolate()->stub_cache()->ComputeKeyedLoadInterceptor( 1588 return isolate()->stub_cache()->ComputeKeyedLoadInterceptor(
1591 name, receiver, holder); 1589 name, receiver, holder);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 name, receiver, holder, info, strict_mode); 1847 name, receiver, holder, info, strict_mode);
1850 } else if (callback->IsAccessorPair()) { 1848 } else if (callback->IsAccessorPair()) {
1851 Handle<Object> setter( 1849 Handle<Object> setter(
1852 Handle<AccessorPair>::cast(callback)->setter(), isolate()); 1850 Handle<AccessorPair>::cast(callback)->setter(), isolate());
1853 if (!setter->IsJSFunction()) break; 1851 if (!setter->IsJSFunction()) break;
1854 if (holder->IsGlobalObject()) break; 1852 if (holder->IsGlobalObject()) break;
1855 if (!holder->HasFastProperties()) break; 1853 if (!holder->HasFastProperties()) break;
1856 Handle<JSFunction> function = Handle<JSFunction>::cast(setter); 1854 Handle<JSFunction> function = Handle<JSFunction>::cast(setter);
1857 CallOptimization call_optimization(function); 1855 CallOptimization call_optimization(function);
1858 if (call_optimization.is_simple_api_call() && 1856 if (call_optimization.is_simple_api_call() &&
1859 call_optimization.IsCompatibleReceiver(*receiver) && 1857 call_optimization.IsCompatibleReceiver(*receiver)) {
1860 FLAG_js_accessor_ics) {
1861 return isolate()->stub_cache()->ComputeStoreCallback( 1858 return isolate()->stub_cache()->ComputeStoreCallback(
1862 name, receiver, holder, call_optimization, strict_mode); 1859 name, receiver, holder, call_optimization, strict_mode);
1863 } 1860 }
1864 return isolate()->stub_cache()->ComputeStoreViaSetter( 1861 return isolate()->stub_cache()->ComputeStoreViaSetter(
1865 name, receiver, holder, Handle<JSFunction>::cast(setter), 1862 name, receiver, holder, Handle<JSFunction>::cast(setter),
1866 strict_mode); 1863 strict_mode);
1867 } 1864 }
1868 // TODO(dcarney): Handle correctly. 1865 // TODO(dcarney): Handle correctly.
1869 if (callback->IsDeclaredAccessorInfo()) break; 1866 if (callback->IsDeclaredAccessorInfo()) break;
1870 ASSERT(callback->IsForeign()); 1867 ASSERT(callback->IsForeign());
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
3159 #undef ADDR 3156 #undef ADDR
3160 }; 3157 };
3161 3158
3162 3159
3163 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3160 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3164 return IC_utilities[id]; 3161 return IC_utilities[id];
3165 } 3162 }
3166 3163
3167 3164
3168 } } // namespace v8::internal 3165 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/test-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698