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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 Handle<Code> code = Handle<Code>::cast(map_or_code); | 134 Handle<Code> code = Handle<Code>::cast(map_or_code); |
135 return code->is_keyed_load_stub() && code->ic_state() == POLYMORPHIC; | 135 return code->is_keyed_load_stub() && code->ic_state() == POLYMORPHIC; |
136 } | 136 } |
137 return false; | 137 return false; |
138 } | 138 } |
139 | 139 |
140 | 140 |
141 bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) { | 141 bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) { |
142 Handle<Object> map_or_code = GetInfo(ast_id); | 142 Handle<Object> map_or_code = GetInfo(ast_id); |
143 if (map_or_code->IsMap()) return false; | 143 if (map_or_code->IsMap()) return false; |
144 if (!map_or_code->IsCode()) return true; | 144 if (!map_or_code->IsCode()) return false; |
145 Handle<Code> code = Handle<Code>::cast(map_or_code); | 145 Handle<Code> code = Handle<Code>::cast(map_or_code); |
146 return code->ic_state() == UNINITIALIZED; | 146 return code->ic_state() == UNINITIALIZED; |
147 } | 147 } |
148 | 148 |
149 | 149 |
150 bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) { | 150 bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) { |
151 Handle<Object> map_or_code = GetInfo(ast_id); | 151 Handle<Object> map_or_code = GetInfo(ast_id); |
152 if (map_or_code->IsMap()) return true; | 152 if (map_or_code->IsMap()) return true; |
153 if (map_or_code->IsCode()) { | 153 if (map_or_code->IsCode()) { |
154 Handle<Code> code = Handle<Code>::cast(map_or_code); | 154 Handle<Code> code = Handle<Code>::cast(map_or_code); |
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 // TODO(verwaest): Return Smi rather than Integer32. | 715 // TODO(verwaest): Return Smi rather than Integer32. |
716 if (info.IsSmi()) return Representation::Integer32(); | 716 if (info.IsSmi()) return Representation::Integer32(); |
717 if (info.IsInteger32()) return Representation::Integer32(); | 717 if (info.IsInteger32()) return Representation::Integer32(); |
718 if (info.IsDouble()) return Representation::Double(); | 718 if (info.IsDouble()) return Representation::Double(); |
719 if (info.IsNumber()) return Representation::Double(); | 719 if (info.IsNumber()) return Representation::Double(); |
720 return Representation::Tagged(); | 720 return Representation::Tagged(); |
721 } | 721 } |
722 | 722 |
723 | 723 |
724 } } // namespace v8::internal | 724 } } // namespace v8::internal |
OLD | NEW |