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 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 is_not_in_new_space_(true), | 2598 is_not_in_new_space_(true), |
2599 is_cell_(false), | 2599 is_cell_(false), |
2600 boolean_value_(true), | 2600 boolean_value_(true), |
2601 external_reference_value_(reference) { | 2601 external_reference_value_(reference) { |
2602 Initialize(Representation::External()); | 2602 Initialize(Representation::External()); |
2603 } | 2603 } |
2604 | 2604 |
2605 | 2605 |
2606 void HConstant::Initialize(Representation r) { | 2606 void HConstant::Initialize(Representation r) { |
2607 if (r.IsNone()) { | 2607 if (r.IsNone()) { |
2608 if (has_smi_value_ && SmiValuesAre31Bits()) { | 2608 if (has_smi_value_) { |
2609 r = Representation::Smi(); | 2609 r = Representation::FromType(Type::Smi()); |
2610 } else if (has_int32_value_) { | 2610 } else if (has_int32_value_) { |
2611 r = Representation::Integer32(); | 2611 r = Representation::Integer32(); |
2612 } else if (has_double_value_) { | 2612 } else if (has_double_value_) { |
2613 r = Representation::Double(); | 2613 r = Representation::Double(); |
2614 } else if (has_external_reference_value_) { | 2614 } else if (has_external_reference_value_) { |
2615 r = Representation::External(); | 2615 r = Representation::External(); |
2616 } else { | 2616 } else { |
2617 Handle<Object> object = object_.handle(); | 2617 Handle<Object> object = object_.handle(); |
2618 if (object->IsJSObject()) { | 2618 if (object->IsJSObject()) { |
2619 // Try to eagerly migrate JSObjects that have deprecated maps. | 2619 // Try to eagerly migrate JSObjects that have deprecated maps. |
(...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4522 break; | 4522 break; |
4523 case kExternalMemory: | 4523 case kExternalMemory: |
4524 stream->Add("[external-memory]"); | 4524 stream->Add("[external-memory]"); |
4525 break; | 4525 break; |
4526 } | 4526 } |
4527 | 4527 |
4528 stream->Add("@%d", offset()); | 4528 stream->Add("@%d", offset()); |
4529 } | 4529 } |
4530 | 4530 |
4531 } } // namespace v8::internal | 4531 } } // namespace v8::internal |
OLD | NEW |