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

Side by Side Diff: src/ic.cc

Issue 101413006: Implement in-heap backing store for typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Self-review Created 7 years 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 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 return generic_stub(); 1801 return generic_stub();
1802 } 1802 }
1803 } 1803 }
1804 1804
1805 // If the store mode isn't the standard mode, make sure that all polymorphic 1805 // If the store mode isn't the standard mode, make sure that all polymorphic
1806 // receivers are either external arrays, or all "normal" arrays. Otherwise, 1806 // receivers are either external arrays, or all "normal" arrays. Otherwise,
1807 // use the generic stub. 1807 // use the generic stub.
1808 if (store_mode != STANDARD_STORE) { 1808 if (store_mode != STANDARD_STORE) {
1809 int external_arrays = 0; 1809 int external_arrays = 0;
1810 for (int i = 0; i < target_receiver_maps.length(); ++i) { 1810 for (int i = 0; i < target_receiver_maps.length(); ++i) {
1811 if (target_receiver_maps[i]->has_external_array_elements()) { 1811 if (target_receiver_maps[i]->has_external_array_elements() ||
1812 target_receiver_maps[i]->has_fixed_typed_array_elements()) {
1812 external_arrays++; 1813 external_arrays++;
1813 } 1814 }
1814 } 1815 }
1815 if (external_arrays != 0 && 1816 if (external_arrays != 0 &&
1816 external_arrays != target_receiver_maps.length()) { 1817 external_arrays != target_receiver_maps.length()) {
1817 TRACE_GENERIC_IC(isolate(), "KeyedIC", 1818 TRACE_GENERIC_IC(isolate(), "KeyedIC",
1818 "unsupported combination of external and normal arrays"); 1819 "unsupported combination of external and normal arrays");
1819 return generic_stub(); 1820 return generic_stub();
1820 } 1821 }
1821 } 1822 }
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 #undef ADDR 3139 #undef ADDR
3139 }; 3140 };
3140 3141
3141 3142
3142 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3143 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3143 return IC_utilities[id]; 3144 return IC_utilities[id];
3144 } 3145 }
3145 3146
3146 3147
3147 } } // namespace v8::internal 3148 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698