| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/ic.h" | 10 #include "src/ic.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 if (!info->IsCode()) { | 193 if (!info->IsCode()) { |
| 194 // For some comparisons we don't have ICs, e.g. LiteralCompareTypeof. | 194 // For some comparisons we don't have ICs, e.g. LiteralCompareTypeof. |
| 195 *left_type = *right_type = *combined_type = Type::None(zone()); | 195 *left_type = *right_type = *combined_type = Type::None(zone()); |
| 196 return; | 196 return; |
| 197 } | 197 } |
| 198 Handle<Code> code = Handle<Code>::cast(info); | 198 Handle<Code> code = Handle<Code>::cast(info); |
| 199 | 199 |
| 200 Handle<Map> map; | 200 Handle<Map> map; |
| 201 Map* raw_map = code->FindFirstMap(); | 201 Map* raw_map = code->FindFirstMap(); |
| 202 if (raw_map != NULL) { | 202 if (raw_map != NULL) { |
| 203 if (Map::CurrentMapForDeprecated(handle(raw_map)).ToHandle(&map) && | 203 if (Map::TryUpdate(handle(raw_map)).ToHandle(&map) && |
| 204 CanRetainOtherContext(*map, *native_context_)) { | 204 CanRetainOtherContext(*map, *native_context_)) { |
| 205 map = Handle<Map>::null(); | 205 map = Handle<Map>::null(); |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 | 208 |
| 209 if (code->is_compare_ic_stub()) { | 209 if (code->is_compare_ic_stub()) { |
| 210 int stub_minor_key = code->stub_info(); | 210 int stub_minor_key = code->stub_info(); |
| 211 CompareIC::StubInfoToType( | 211 CompareIC::StubInfoToType( |
| 212 stub_minor_key, left_type, right_type, combined_type, map, zone()); | 212 stub_minor_key, left_type, right_type, combined_type, map, zone()); |
| 213 } else if (code->is_compare_nil_ic_stub()) { | 213 } else if (code->is_compare_nil_ic_stub()) { |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 UnseededNumberDictionary::kNotFound); | 476 UnseededNumberDictionary::kNotFound); |
| 477 // Dictionary has been allocated with sufficient size for all elements. | 477 // Dictionary has been allocated with sufficient size for all elements. |
| 478 DisallowHeapAllocation no_need_to_resize_dictionary; | 478 DisallowHeapAllocation no_need_to_resize_dictionary; |
| 479 HandleScope scope(isolate()); | 479 HandleScope scope(isolate()); |
| 480 USE(UnseededNumberDictionary::AtNumberPut( | 480 USE(UnseededNumberDictionary::AtNumberPut( |
| 481 dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 481 dictionary_, IdToKey(ast_id), handle(target, isolate()))); |
| 482 } | 482 } |
| 483 | 483 |
| 484 | 484 |
| 485 } } // namespace v8::internal | 485 } } // namespace v8::internal |
| OLD | NEW |