OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 "hydrogen.h" | 5 #include "hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "v8.h" | 9 #include "v8.h" |
10 #include "allocation-site-scopes.h" | 10 #include "allocation-site-scopes.h" |
(...skipping 5338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5349 access = HObjectAccess::ForHeapNumberValue(); | 5349 access = HObjectAccess::ForHeapNumberValue(); |
5350 } | 5350 } |
5351 | 5351 |
5352 SmallMapList* map_list = info->field_maps(); | 5352 SmallMapList* map_list = info->field_maps(); |
5353 if (map_list->length() == 0) { | 5353 if (map_list->length() == 0) { |
5354 return New<HLoadNamedField>(checked_object, checked_object, access); | 5354 return New<HLoadNamedField>(checked_object, checked_object, access); |
5355 } | 5355 } |
5356 | 5356 |
5357 UniqueSet<Map>* maps = new(zone()) UniqueSet<Map>(map_list->length(), zone()); | 5357 UniqueSet<Map>* maps = new(zone()) UniqueSet<Map>(map_list->length(), zone()); |
5358 for (int i = 0; i < map_list->length(); ++i) { | 5358 for (int i = 0; i < map_list->length(); ++i) { |
5359 Handle<Map> map = map_list->at(i); | 5359 maps->Add(Unique<Map>::CreateImmovable(map_list->at(i)), zone()); |
5360 maps->Add(Unique<Map>::CreateImmovable(map), zone()); | |
5361 // TODO(bmeurer): Get rid of this shit! | |
5362 if (map->CanTransition()) { | |
5363 Map::AddDependentCompilationInfo( | |
5364 map, DependentCode::kPrototypeCheckGroup, top_info()); | |
5365 } | |
5366 } | 5360 } |
5367 return New<HLoadNamedField>( | 5361 return New<HLoadNamedField>( |
5368 checked_object, checked_object, access, maps, info->field_type()); | 5362 checked_object, checked_object, access, maps, info->field_type()); |
5369 } | 5363 } |
5370 | 5364 |
5371 | 5365 |
5372 HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField( | 5366 HInstruction* HOptimizedGraphBuilder::BuildStoreNamedField( |
5373 PropertyAccessInfo* info, | 5367 PropertyAccessInfo* info, |
5374 HValue* checked_object, | 5368 HValue* checked_object, |
5375 HValue* value) { | 5369 HValue* value) { |
(...skipping 6297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11673 if (ShouldProduceTraceOutput()) { | 11667 if (ShouldProduceTraceOutput()) { |
11674 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11668 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11675 } | 11669 } |
11676 | 11670 |
11677 #ifdef DEBUG | 11671 #ifdef DEBUG |
11678 graph_->Verify(false); // No full verify. | 11672 graph_->Verify(false); // No full verify. |
11679 #endif | 11673 #endif |
11680 } | 11674 } |
11681 | 11675 |
11682 } } // namespace v8::internal | 11676 } } // namespace v8::internal |
OLD | NEW |