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 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2414 static void PrepareConstant(Handle<Object> object) { | 2414 static void PrepareConstant(Handle<Object> object) { |
2415 if (!object->IsJSObject()) return; | 2415 if (!object->IsJSObject()) return; |
2416 Handle<JSObject> js_object = Handle<JSObject>::cast(object); | 2416 Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
2417 if (!js_object->map()->is_deprecated()) return; | 2417 if (!js_object->map()->is_deprecated()) return; |
2418 JSObject::TryMigrateInstance(js_object); | 2418 JSObject::TryMigrateInstance(js_object); |
2419 } | 2419 } |
2420 | 2420 |
2421 | 2421 |
2422 void HConstant::Initialize(Representation r) { | 2422 void HConstant::Initialize(Representation r) { |
2423 if (r.IsNone()) { | 2423 if (r.IsNone()) { |
2424 if (has_smi_value_ && kSmiValueSize == 31) { | 2424 if (has_smi_value_ && SmiValuesAre31Bits()) { |
2425 r = Representation::Smi(); | 2425 r = Representation::Smi(); |
2426 } else if (has_int32_value_) { | 2426 } else if (has_int32_value_) { |
2427 r = Representation::Integer32(); | 2427 r = Representation::Integer32(); |
2428 } else if (has_double_value_) { | 2428 } else if (has_double_value_) { |
2429 r = Representation::Double(); | 2429 r = Representation::Double(); |
2430 } else if (has_external_reference_value_) { | 2430 } else if (has_external_reference_value_) { |
2431 r = Representation::External(); | 2431 r = Representation::External(); |
2432 } else { | 2432 } else { |
2433 PrepareConstant(handle_); | 2433 PrepareConstant(handle_); |
2434 r = Representation::Tagged(); | 2434 r = Representation::Tagged(); |
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4135 break; | 4135 break; |
4136 case kExternalMemory: | 4136 case kExternalMemory: |
4137 stream->Add("[external-memory]"); | 4137 stream->Add("[external-memory]"); |
4138 break; | 4138 break; |
4139 } | 4139 } |
4140 | 4140 |
4141 stream->Add("@%d", offset()); | 4141 stream->Add("@%d", offset()); |
4142 } | 4142 } |
4143 | 4143 |
4144 } } // namespace v8::internal | 4144 } } // namespace v8::internal |
OLD | NEW |