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 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2606 is_not_in_new_space_(true), | 2606 is_not_in_new_space_(true), |
2607 is_cell_(false), | 2607 is_cell_(false), |
2608 boolean_value_(true), | 2608 boolean_value_(true), |
2609 external_reference_value_(reference) { | 2609 external_reference_value_(reference) { |
2610 Initialize(Representation::External()); | 2610 Initialize(Representation::External()); |
2611 } | 2611 } |
2612 | 2612 |
2613 | 2613 |
2614 void HConstant::Initialize(Representation r) { | 2614 void HConstant::Initialize(Representation r) { |
2615 if (r.IsNone()) { | 2615 if (r.IsNone()) { |
2616 if (has_smi_value_) { | 2616 if (has_smi_value_ && SmiValuesAre31Bits()) { |
2617 r = Representation::FromType(Type::Smi()); | 2617 r = Representation::Smi(); |
2618 } else if (has_int32_value_) { | 2618 } else if (has_int32_value_) { |
2619 r = Representation::Integer32(); | 2619 r = Representation::Integer32(); |
2620 } else if (has_double_value_) { | 2620 } else if (has_double_value_) { |
2621 r = Representation::Double(); | 2621 r = Representation::Double(); |
2622 } else if (has_external_reference_value_) { | 2622 } else if (has_external_reference_value_) { |
2623 r = Representation::External(); | 2623 r = Representation::External(); |
2624 } else { | 2624 } else { |
2625 Handle<Object> object = object_.handle(); | 2625 Handle<Object> object = object_.handle(); |
2626 if (object->IsJSObject()) { | 2626 if (object->IsJSObject()) { |
2627 // Try to eagerly migrate JSObjects that have deprecated maps. | 2627 // Try to eagerly migrate JSObjects that have deprecated maps. |
(...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4530 break; | 4530 break; |
4531 case kExternalMemory: | 4531 case kExternalMemory: |
4532 stream->Add("[external-memory]"); | 4532 stream->Add("[external-memory]"); |
4533 break; | 4533 break; |
4534 } | 4534 } |
4535 | 4535 |
4536 stream->Add("@%d", offset()); | 4536 stream->Add("@%d", offset()); |
4537 } | 4537 } |
4538 | 4538 |
4539 } } // namespace v8::internal | 4539 } } // namespace v8::internal |
OLD | NEW |