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

Side by Side Diff: src/ic.cc

Issue 15014020: Elide hole checks on KeyedLoads of holey double arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implement missing platforms and add tests Created 7 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
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 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 return StoreIC::Store(state, 2013 return StoreIC::Store(state,
2014 strict_mode, 2014 strict_mode,
2015 object, 2015 object,
2016 Handle<String>::cast(key), 2016 Handle<String>::cast(key),
2017 value, 2017 value,
2018 JSReceiver::MAY_BE_STORE_FROM_KEYED); 2018 JSReceiver::MAY_BE_STORE_FROM_KEYED);
2019 } 2019 }
2020 2020
2021 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded() && 2021 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded() &&
2022 !(FLAG_harmony_observation && object->IsJSObject() && 2022 !(FLAG_harmony_observation && object->IsJSObject() &&
2023 JSObject::cast(*object)->map()->is_observed()); 2023 JSObject::cast(*object)->map()->is_observed());
2024 if (use_ic && !object->IsSmi()) {
2025 // Don't use ICs for maps of the objects in Array's prototype chain. We
2026 // expect to be able to trap element sets to objects with those maps in the
2027 // runtime to enable optimization of element hole access.
2028 Handle<HeapObject> heap_object = Handle<HeapObject>::cast(object);
2029 if (heap_object->map()->IsMapInArrayPrototypeChain()) use_ic = false;
2030 }
2024 ASSERT(!(use_ic && object->IsJSGlobalProxy())); 2031 ASSERT(!(use_ic && object->IsJSGlobalProxy()));
2025 2032
2026 if (use_ic) { 2033 if (use_ic) {
2027 Handle<Code> stub = (strict_mode == kStrictMode) 2034 Handle<Code> stub = (strict_mode == kStrictMode)
2028 ? generic_stub_strict() 2035 ? generic_stub_strict()
2029 : generic_stub(); 2036 : generic_stub();
2030 if (miss_mode != MISS_FORCE_GENERIC) { 2037 if (miss_mode != MISS_FORCE_GENERIC) {
2031 if (object->IsJSObject()) { 2038 if (object->IsJSObject()) {
2032 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 2039 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
2033 if (receiver->map()->is_deprecated()) { 2040 if (receiver->map()->is_deprecated()) {
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
3007 #undef ADDR 3014 #undef ADDR
3008 }; 3015 };
3009 3016
3010 3017
3011 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3018 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3012 return IC_utilities[id]; 3019 return IC_utilities[id];
3013 } 3020 }
3014 3021
3015 3022
3016 } } // namespace v8::internal 3023 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/isolate.h » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698