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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "double.h" | 7 #include "double.h" |
8 #include "factory.h" | 8 #include "factory.h" |
9 #include "hydrogen-infer-representation.h" | 9 #include "hydrogen-infer-representation.h" |
10 #include "property-details-inl.h" | 10 #include "property-details-inl.h" |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 *tag = kInternalizedTag; | 1664 *tag = kInternalizedTag; |
1665 return; | 1665 return; |
1666 default: | 1666 default: |
1667 UNREACHABLE(); | 1667 UNREACHABLE(); |
1668 } | 1668 } |
1669 } | 1669 } |
1670 | 1670 |
1671 | 1671 |
1672 void HCheckMaps::PrintDataTo(StringStream* stream) { | 1672 void HCheckMaps::PrintDataTo(StringStream* stream) { |
1673 value()->PrintNameTo(stream); | 1673 value()->PrintNameTo(stream); |
1674 stream->Add(" [%p", *map_set_.at(0).handle()); | 1674 stream->Add(" [%p", *maps()->at(0).handle()); |
1675 for (int i = 1; i < map_set_.size(); ++i) { | 1675 for (int i = 1; i < maps()->size(); ++i) { |
1676 stream->Add(",%p", *map_set_.at(i).handle()); | 1676 stream->Add(",%p", *maps()->at(i).handle()); |
1677 } | 1677 } |
1678 stream->Add("]%s", CanOmitMapChecks() ? "(omitted)" : ""); | 1678 stream->Add("]%s", CanOmitMapChecks() ? "(omitted)" : ""); |
1679 } | 1679 } |
1680 | 1680 |
1681 | 1681 |
1682 void HCheckValue::PrintDataTo(StringStream* stream) { | 1682 void HCheckValue::PrintDataTo(StringStream* stream) { |
1683 value()->PrintNameTo(stream); | 1683 value()->PrintNameTo(stream); |
1684 stream->Add(" "); | 1684 stream->Add(" "); |
1685 object().handle()->ShortPrint(stream); | 1685 object().handle()->ShortPrint(stream); |
1686 } | 1686 } |
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3355 | 3355 |
3356 void HParameter::PrintDataTo(StringStream* stream) { | 3356 void HParameter::PrintDataTo(StringStream* stream) { |
3357 stream->Add("%u", index()); | 3357 stream->Add("%u", index()); |
3358 } | 3358 } |
3359 | 3359 |
3360 | 3360 |
3361 void HLoadNamedField::PrintDataTo(StringStream* stream) { | 3361 void HLoadNamedField::PrintDataTo(StringStream* stream) { |
3362 object()->PrintNameTo(stream); | 3362 object()->PrintNameTo(stream); |
3363 access_.PrintTo(stream); | 3363 access_.PrintTo(stream); |
3364 | 3364 |
3365 if (map_set_.size() != 0) { | 3365 if (maps()->size() != 0) { |
3366 stream->Add(" [%p", *map_set_.at(0).handle()); | 3366 stream->Add(" [%p", *maps()->at(0).handle()); |
3367 for (int i = 1; i < map_set_.size(); ++i) { | 3367 for (int i = 1; i < maps()->size(); ++i) { |
3368 stream->Add(",%p", *map_set_.at(i).handle()); | 3368 stream->Add(",%p", *maps()->at(i).handle()); |
3369 } | 3369 } |
3370 stream->Add("]"); | 3370 stream->Add("]"); |
3371 } | 3371 } |
3372 | 3372 |
3373 if (HasDependency()) { | 3373 if (HasDependency()) { |
3374 stream->Add(" "); | 3374 stream->Add(" "); |
3375 dependency()->PrintNameTo(stream); | 3375 dependency()->PrintNameTo(stream); |
3376 } | 3376 } |
3377 } | 3377 } |
3378 | 3378 |
3379 | 3379 |
3380 HCheckMaps* HCheckMaps::New(Zone* zone, | 3380 HCheckMaps* HCheckMaps::New(Zone* zone, |
3381 HValue* context, | 3381 HValue* context, |
3382 HValue* value, | 3382 HValue* value, |
3383 Handle<Map> map, | 3383 Handle<Map> map, |
3384 CompilationInfo* info, | 3384 CompilationInfo* info, |
3385 HValue* typecheck) { | 3385 HValue* typecheck) { |
3386 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); | 3386 HCheckMaps* check_map = new(zone) HCheckMaps(value, new(zone) UniqueSet<Map>( |
3387 check_map->Add(map, zone); | 3387 Unique<Map>::CreateImmovable(map), zone), typecheck); |
| 3388 // TODO(bmeurer): Get rid of this shit! |
3388 if (map->CanOmitMapChecks() && | 3389 if (map->CanOmitMapChecks() && |
3389 value->IsConstant() && | 3390 value->IsConstant() && |
3390 HConstant::cast(value)->HasMap(map)) { | 3391 HConstant::cast(value)->HasMap(map)) { |
3391 // TODO(titzer): collect dependent map checks into a list. | 3392 // TODO(titzer): collect dependent map checks into a list. |
3392 check_map->omit_ = true; | 3393 check_map->omit_ = true; |
3393 if (map->CanTransition()) { | 3394 if (map->CanTransition()) { |
3394 Map::AddDependentCompilationInfo( | 3395 Map::AddDependentCompilationInfo( |
3395 map, DependentCode::kPrototypeCheckGroup, info); | 3396 map, DependentCode::kPrototypeCheckGroup, info); |
3396 } | 3397 } |
3397 } | 3398 } |
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4745 break; | 4746 break; |
4746 case kExternalMemory: | 4747 case kExternalMemory: |
4747 stream->Add("[external-memory]"); | 4748 stream->Add("[external-memory]"); |
4748 break; | 4749 break; |
4749 } | 4750 } |
4750 | 4751 |
4751 stream->Add("@%d", offset()); | 4752 stream->Add("@%d", offset()); |
4752 } | 4753 } |
4753 | 4754 |
4754 } } // namespace v8::internal | 4755 } } // namespace v8::internal |
OLD | NEW |