| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 20 matching lines...) Expand all Loading... |
| 31 #include "api.h" | 31 #include "api.h" |
| 32 #include "arguments.h" | 32 #include "arguments.h" |
| 33 #include "execution.h" | 33 #include "execution.h" |
| 34 #include "ic-inl.h" | 34 #include "ic-inl.h" |
| 35 #include "runtime.h" | 35 #include "runtime.h" |
| 36 #include "stub-cache.h" | 36 #include "stub-cache.h" |
| 37 | 37 |
| 38 namespace v8 { namespace internal { | 38 namespace v8 { namespace internal { |
| 39 | 39 |
| 40 #ifdef DEBUG | 40 #ifdef DEBUG |
| 41 DEFINE_bool(trace_ic, false, "trace inline cache state transitions"); | |
| 42 #endif | |
| 43 DEFINE_bool(use_ic, true, "use inline caching"); | |
| 44 DECLARE_bool(strict); | |
| 45 | |
| 46 | |
| 47 #ifdef DEBUG | |
| 48 static char TransitionMarkFromState(IC::State state) { | 41 static char TransitionMarkFromState(IC::State state) { |
| 49 switch (state) { | 42 switch (state) { |
| 50 case UNINITIALIZED: return '0'; | 43 case UNINITIALIZED: return '0'; |
| 51 case PREMONOMORPHIC: return '0'; | 44 case PREMONOMORPHIC: return '0'; |
| 52 case MONOMORPHIC: return '1'; | 45 case MONOMORPHIC: return '1'; |
| 53 case MONOMORPHIC_PROTOTYPE_FAILURE: return '^'; | 46 case MONOMORPHIC_PROTOTYPE_FAILURE: return '^'; |
| 54 case MEGAMORPHIC: return 'N'; | 47 case MEGAMORPHIC: return 'N'; |
| 55 | 48 |
| 56 // We never see the debugger states here, because the state is | 49 // We never see the debugger states here, because the state is |
| 57 // computed from the original code - not the patched code. Let | 50 // computed from the original code - not the patched code. Let |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 #undef ADDR | 1143 #undef ADDR |
| 1151 }; | 1144 }; |
| 1152 | 1145 |
| 1153 | 1146 |
| 1154 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1147 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 1155 return IC_utilities[id]; | 1148 return IC_utilities[id]; |
| 1156 } | 1149 } |
| 1157 | 1150 |
| 1158 | 1151 |
| 1159 } } // namespace v8::internal | 1152 } } // namespace v8::internal |
| OLD | NEW |