OLD | NEW |
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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 } else if (state != MEGAMORPHIC) { | 918 } else if (state != MEGAMORPHIC) { |
919 ASSERT(state != GENERIC); | 919 ASSERT(state != GENERIC); |
920 stub = megamorphic_stub(); | 920 stub = megamorphic_stub(); |
921 } | 921 } |
922 if (!stub.is_null()) { | 922 if (!stub.is_null()) { |
923 set_target(*stub); | 923 set_target(*stub); |
924 #ifdef DEBUG | 924 #ifdef DEBUG |
925 if (FLAG_trace_ic) PrintF("[LoadIC : +#prototype /function]\n"); | 925 if (FLAG_trace_ic) PrintF("[LoadIC : +#prototype /function]\n"); |
926 #endif | 926 #endif |
927 } | 927 } |
928 return *Accessors::FunctionGetPrototype(object); | 928 return *Accessors::FunctionGetPrototype(Handle<JSFunction>::cast(object)); |
929 } | 929 } |
930 } | 930 } |
931 | 931 |
932 // Check if the name is trivially convertible to an index and get | 932 // Check if the name is trivially convertible to an index and get |
933 // the element or char if so. | 933 // the element or char if so. |
934 uint32_t index; | 934 uint32_t index; |
935 if (kind() == Code::KEYED_LOAD_IC && name->AsArrayIndex(&index)) { | 935 if (kind() == Code::KEYED_LOAD_IC && name->AsArrayIndex(&index)) { |
936 // Rewrite to the generic keyed load stub. | 936 // Rewrite to the generic keyed load stub. |
937 if (FLAG_use_ic) set_target(*generic_stub()); | 937 if (FLAG_use_ic) set_target(*generic_stub()); |
938 return Runtime::GetElementOrCharAtOrFail(isolate(), object, index); | 938 return Runtime::GetElementOrCharAtOrFail(isolate(), object, index); |
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3106 #undef ADDR | 3106 #undef ADDR |
3107 }; | 3107 }; |
3108 | 3108 |
3109 | 3109 |
3110 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3110 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
3111 return IC_utilities[id]; | 3111 return IC_utilities[id]; |
3112 } | 3112 } |
3113 | 3113 |
3114 | 3114 |
3115 } } // namespace v8::internal | 3115 } } // namespace v8::internal |
OLD | NEW |