Revision: 15600
Author: [email protected]
Date: Wed Jul 10 08:24:15 2013
Log: Allow NORMAL ICs to go polymorphic.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/19005002
http://code.google.com/p/v8/source/detail?r=15600
Modified:
/branches/bleeding_edge/src/ic.cc
=======================================
--- /branches/bleeding_edge/src/ic.cc Tue Jul 9 01:22:41 2013
+++ /branches/bleeding_edge/src/ic.cc Wed Jul 10 08:24:15 2013
@@ -978,12 +978,6 @@
Handle<String> name,
Handle<Code> code,
StrictModeFlag strict_mode) {
- if (code->type() == Code::NORMAL) return false;
- if (target()->ic_state() == MONOMORPHIC &&
- target()->type() == Code::NORMAL) {
- return false;
- }
-
MapHandleList receiver_maps;
CodeHandleList handlers;
@@ -992,7 +986,12 @@
Handle<Map> new_receiver_map(receiver->map());
{
DisallowHeapAllocation no_gc;
- target()->FindAllMaps(&receiver_maps);
+ if (target()->ic_state() == POLYMORPHIC ||
+ (target()->ic_state() == MONOMORPHIC &&
+ target()->type() != Code::NORMAL)) {
+ target()->FindAllMaps(&receiver_maps);
+ }
+
int number_of_maps = receiver_maps.length();
number_of_valid_maps = number_of_maps;
@@ -1012,12 +1011,9 @@
if (number_of_valid_maps >= 4) return false;
- // Only allow 0 maps in case target() was reset to UNINITIALIZED by
the GC.
- // In that case, allow the IC to go back monomorphic.
- if (number_of_maps == 0 && target()->ic_state() != UNINITIALIZED) {
- return false;
+ if (number_of_maps > 0) {
+ target()->FindAllCode(&handlers, receiver_maps.length());
}
- target()->FindAllCode(&handlers, receiver_maps.length());
}
number_of_valid_maps++;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.