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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 if (!info->IsCode()) { | 210 if (!info->IsCode()) { |
211 // For some comparisons we don't have ICs, e.g. LiteralCompareTypeof. | 211 // For some comparisons we don't have ICs, e.g. LiteralCompareTypeof. |
212 *left_type = *right_type = *combined_type = Type::None(zone()); | 212 *left_type = *right_type = *combined_type = Type::None(zone()); |
213 return; | 213 return; |
214 } | 214 } |
215 Handle<Code> code = Handle<Code>::cast(info); | 215 Handle<Code> code = Handle<Code>::cast(info); |
216 | 216 |
217 Handle<Map> map; | 217 Handle<Map> map; |
218 Map* raw_map = code->FindFirstMap(); | 218 Map* raw_map = code->FindFirstMap(); |
219 if (raw_map != NULL) { | 219 if (raw_map != NULL) { |
220 map = Map::CurrentMapForDeprecated(handle(raw_map)); | 220 if (Map::CurrentMapForDeprecated(handle(raw_map)).ToHandle(&map) && |
221 if (!map.is_null() && CanRetainOtherContext(*map, *native_context_)) { | 221 CanRetainOtherContext(*map, *native_context_)) { |
222 map = Handle<Map>::null(); | 222 map = Handle<Map>::null(); |
223 } | 223 } |
224 } | 224 } |
225 | 225 |
226 if (code->is_compare_ic_stub()) { | 226 if (code->is_compare_ic_stub()) { |
227 int stub_minor_key = code->stub_info(); | 227 int stub_minor_key = code->stub_info(); |
228 CompareIC::StubInfoToType( | 228 CompareIC::StubInfoToType( |
229 stub_minor_key, left_type, right_type, combined_type, map, zone()); | 229 stub_minor_key, left_type, right_type, combined_type, map, zone()); |
230 } else if (code->is_compare_nil_ic_stub()) { | 230 } else if (code->is_compare_nil_ic_stub()) { |
231 CompareNilICStub stub(isolate(), code->extra_ic_state()); | 231 CompareNilICStub stub(isolate(), code->extra_ic_state()); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 UnseededNumberDictionary::kNotFound); | 493 UnseededNumberDictionary::kNotFound); |
494 // Dictionary has been allocated with sufficient size for all elements. | 494 // Dictionary has been allocated with sufficient size for all elements. |
495 DisallowHeapAllocation no_need_to_resize_dictionary; | 495 DisallowHeapAllocation no_need_to_resize_dictionary; |
496 HandleScope scope(isolate()); | 496 HandleScope scope(isolate()); |
497 USE(UnseededNumberDictionary::AtNumberPut( | 497 USE(UnseededNumberDictionary::AtNumberPut( |
498 dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 498 dictionary_, IdToKey(ast_id), handle(target, isolate()))); |
499 } | 499 } |
500 | 500 |
501 | 501 |
502 } } // namespace v8::internal | 502 } } // namespace v8::internal |
OLD | NEW |