| 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 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 return ""; | 1732 return ""; |
| 1733 } | 1733 } |
| 1734 | 1734 |
| 1735 | 1735 |
| 1736 void HCheckInstanceType::PrintDataTo(StringStream* stream) { | 1736 void HCheckInstanceType::PrintDataTo(StringStream* stream) { |
| 1737 stream->Add("%s ", GetCheckName()); | 1737 stream->Add("%s ", GetCheckName()); |
| 1738 HUnaryOperation::PrintDataTo(stream); | 1738 HUnaryOperation::PrintDataTo(stream); |
| 1739 } | 1739 } |
| 1740 | 1740 |
| 1741 | 1741 |
| 1742 void HCheckPrototypeMaps::PrintDataTo(StringStream* stream) { | |
| 1743 stream->Add("[receiver_prototype=%p,holder=%p]%s", | |
| 1744 *prototypes_.first(), *prototypes_.last(), | |
| 1745 CanOmitPrototypeChecks() ? " (omitted)" : ""); | |
| 1746 } | |
| 1747 | |
| 1748 | |
| 1749 void HCallStub::PrintDataTo(StringStream* stream) { | 1742 void HCallStub::PrintDataTo(StringStream* stream) { |
| 1750 stream->Add("%s ", | 1743 stream->Add("%s ", |
| 1751 CodeStub::MajorName(major_key_, false)); | 1744 CodeStub::MajorName(major_key_, false)); |
| 1752 HUnaryCall::PrintDataTo(stream); | 1745 HUnaryCall::PrintDataTo(stream); |
| 1753 } | 1746 } |
| 1754 | 1747 |
| 1755 | 1748 |
| 1756 void HInstanceOf::PrintDataTo(StringStream* stream) { | 1749 void HInstanceOf::PrintDataTo(StringStream* stream) { |
| 1757 left()->PrintNameTo(stream); | 1750 left()->PrintNameTo(stream); |
| 1758 stream->Add(" "); | 1751 stream->Add(" "); |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2746 has_external_reference_value_(true), | 2739 has_external_reference_value_(true), |
| 2747 is_internalized_string_(false), | 2740 is_internalized_string_(false), |
| 2748 is_not_in_new_space_(true), | 2741 is_not_in_new_space_(true), |
| 2749 is_cell_(false), | 2742 is_cell_(false), |
| 2750 boolean_value_(true), | 2743 boolean_value_(true), |
| 2751 external_reference_value_(reference) { | 2744 external_reference_value_(reference) { |
| 2752 Initialize(Representation::External()); | 2745 Initialize(Representation::External()); |
| 2753 } | 2746 } |
| 2754 | 2747 |
| 2755 | 2748 |
| 2749 static void PrepareConstant(Handle<Object> object) { |
| 2750 if (!object->IsJSObject()) return; |
| 2751 Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
| 2752 if (!js_object->map()->is_deprecated()) return; |
| 2753 JSObject::TryMigrateInstance(js_object); |
| 2754 } |
| 2755 |
| 2756 |
| 2756 void HConstant::Initialize(Representation r) { | 2757 void HConstant::Initialize(Representation r) { |
| 2757 if (r.IsNone()) { | 2758 if (r.IsNone()) { |
| 2758 if (has_smi_value_ && kSmiValueSize == 31) { | 2759 if (has_smi_value_ && kSmiValueSize == 31) { |
| 2759 r = Representation::Smi(); | 2760 r = Representation::Smi(); |
| 2760 } else if (has_int32_value_) { | 2761 } else if (has_int32_value_) { |
| 2761 r = Representation::Integer32(); | 2762 r = Representation::Integer32(); |
| 2762 } else if (has_double_value_) { | 2763 } else if (has_double_value_) { |
| 2763 r = Representation::Double(); | 2764 r = Representation::Double(); |
| 2764 } else if (has_external_reference_value_) { | 2765 } else if (has_external_reference_value_) { |
| 2765 r = Representation::External(); | 2766 r = Representation::External(); |
| 2766 } else { | 2767 } else { |
| 2768 PrepareConstant(handle_); |
| 2767 r = Representation::Tagged(); | 2769 r = Representation::Tagged(); |
| 2768 } | 2770 } |
| 2769 } | 2771 } |
| 2770 set_representation(r); | 2772 set_representation(r); |
| 2771 SetFlag(kUseGVN); | 2773 SetFlag(kUseGVN); |
| 2772 } | 2774 } |
| 2773 | 2775 |
| 2774 | 2776 |
| 2775 bool HConstant::EmitAtUses() { | 2777 bool HConstant::EmitAtUses() { |
| 2776 ASSERT(IsLinked()); | 2778 ASSERT(IsLinked()); |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4469 break; | 4471 break; |
| 4470 case kExternalMemory: | 4472 case kExternalMemory: |
| 4471 stream->Add("[external-memory]"); | 4473 stream->Add("[external-memory]"); |
| 4472 break; | 4474 break; |
| 4473 } | 4475 } |
| 4474 | 4476 |
| 4475 stream->Add("@%d", offset()); | 4477 stream->Add("@%d", offset()); |
| 4476 } | 4478 } |
| 4477 | 4479 |
| 4478 } } // namespace v8::internal | 4480 } } // namespace v8::internal |
| OLD | NEW |