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 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2859 HCheckMaps* HCheckMaps::New(Zone* zone, | 2859 HCheckMaps* HCheckMaps::New(Zone* zone, |
2860 HValue* context, | 2860 HValue* context, |
2861 HValue* value, | 2861 HValue* value, |
2862 Handle<Map> map, | 2862 Handle<Map> map, |
2863 CompilationInfo* info, | 2863 CompilationInfo* info, |
2864 HValue* typecheck) { | 2864 HValue* typecheck) { |
2865 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); | 2865 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); |
2866 check_map->Add(map, zone); | 2866 check_map->Add(map, zone); |
2867 if (map->CanOmitMapChecks() && | 2867 if (map->CanOmitMapChecks() && |
2868 value->IsConstant() && | 2868 value->IsConstant() && |
2869 HConstant::cast(value)->InstanceOf(map)) { | 2869 HConstant::cast(value)->HasMap(map)) { |
2870 check_map->omit(info); | 2870 check_map->omit(info); |
2871 } | 2871 } |
2872 return check_map; | 2872 return check_map; |
2873 } | 2873 } |
2874 | 2874 |
2875 | 2875 |
2876 void HCheckMaps::FinalizeUniqueValueId() { | 2876 void HCheckMaps::FinalizeUniqueValueId() { |
2877 if (!map_unique_ids_.is_empty()) return; | 2877 if (!map_unique_ids_.is_empty()) return; |
2878 Zone* zone = block()->zone(); | 2878 Zone* zone = block()->zone(); |
2879 map_unique_ids_.Initialize(map_set_.length(), zone); | 2879 map_unique_ids_.Initialize(map_set_.length(), zone); |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3997 break; | 3997 break; |
3998 case kExternalMemory: | 3998 case kExternalMemory: |
3999 stream->Add("[external-memory]"); | 3999 stream->Add("[external-memory]"); |
4000 break; | 4000 break; |
4001 } | 4001 } |
4002 | 4002 |
4003 stream->Add("@%d", offset()); | 4003 stream->Add("@%d", offset()); |
4004 } | 4004 } |
4005 | 4005 |
4006 } } // namespace v8::internal | 4006 } } // namespace v8::internal |
OLD | NEW |