| 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 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2516 Heap* heap = Handle<HeapObject>::cast(handle)->GetHeap(); | 2516 Heap* heap = Handle<HeapObject>::cast(handle)->GetHeap(); |
| 2517 is_not_in_new_space_ = !heap->InNewSpace(*handle); | 2517 is_not_in_new_space_ = !heap->InNewSpace(*handle); |
| 2518 } | 2518 } |
| 2519 if (handle->IsNumber()) { | 2519 if (handle->IsNumber()) { |
| 2520 double n = handle->Number(); | 2520 double n = handle->Number(); |
| 2521 has_int32_value_ = IsInteger32(n); | 2521 has_int32_value_ = IsInteger32(n); |
| 2522 int32_value_ = DoubleToInt32(n); | 2522 int32_value_ = DoubleToInt32(n); |
| 2523 has_smi_value_ = has_int32_value_ && Smi::IsValid(int32_value_); | 2523 has_smi_value_ = has_int32_value_ && Smi::IsValid(int32_value_); |
| 2524 double_value_ = n; | 2524 double_value_ = n; |
| 2525 has_double_value_ = true; | 2525 has_double_value_ = true; |
| 2526 // TODO(titzer): if this heap number is new space, tenure a new one. |
| 2526 } else { | 2527 } else { |
| 2527 is_internalized_string_ = handle->IsInternalizedString(); | 2528 is_internalized_string_ = handle->IsInternalizedString(); |
| 2528 } | 2529 } |
| 2529 | 2530 |
| 2530 is_cell_ = !handle.is_null() && | 2531 is_cell_ = !handle.is_null() && |
| 2531 (handle->IsCell() || handle->IsPropertyCell()); | 2532 (handle->IsCell() || handle->IsPropertyCell()); |
| 2532 Initialize(r); | 2533 Initialize(r); |
| 2533 } | 2534 } |
| 2534 | 2535 |
| 2535 | 2536 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2714 if (has_int32_value_) { | 2715 if (has_int32_value_) { |
| 2715 stream->Add("%d ", int32_value_); | 2716 stream->Add("%d ", int32_value_); |
| 2716 } else if (has_double_value_) { | 2717 } else if (has_double_value_) { |
| 2717 stream->Add("%f ", FmtElm(double_value_)); | 2718 stream->Add("%f ", FmtElm(double_value_)); |
| 2718 } else if (has_external_reference_value_) { | 2719 } else if (has_external_reference_value_) { |
| 2719 stream->Add("%p ", reinterpret_cast<void*>( | 2720 stream->Add("%p ", reinterpret_cast<void*>( |
| 2720 external_reference_value_.address())); | 2721 external_reference_value_.address())); |
| 2721 } else { | 2722 } else { |
| 2722 handle(Isolate::Current())->ShortPrint(stream); | 2723 handle(Isolate::Current())->ShortPrint(stream); |
| 2723 } | 2724 } |
| 2725 if (!is_not_in_new_space_) { |
| 2726 stream->Add("[new space] "); |
| 2727 } |
| 2724 } | 2728 } |
| 2725 | 2729 |
| 2726 | 2730 |
| 2727 void HBinaryOperation::PrintDataTo(StringStream* stream) { | 2731 void HBinaryOperation::PrintDataTo(StringStream* stream) { |
| 2728 left()->PrintNameTo(stream); | 2732 left()->PrintNameTo(stream); |
| 2729 stream->Add(" "); | 2733 stream->Add(" "); |
| 2730 right()->PrintNameTo(stream); | 2734 right()->PrintNameTo(stream); |
| 2731 if (CheckFlag(kCanOverflow)) stream->Add(" !"); | 2735 if (CheckFlag(kCanOverflow)) stream->Add(" !"); |
| 2732 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); | 2736 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
| 2733 } | 2737 } |
| (...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4401 break; | 4405 break; |
| 4402 case kExternalMemory: | 4406 case kExternalMemory: |
| 4403 stream->Add("[external-memory]"); | 4407 stream->Add("[external-memory]"); |
| 4404 break; | 4408 break; |
| 4405 } | 4409 } |
| 4406 | 4410 |
| 4407 stream->Add("@%d", offset()); | 4411 stream->Add("@%d", offset()); |
| 4408 } | 4412 } |
| 4409 | 4413 |
| 4410 } } // namespace v8::internal | 4414 } } // namespace v8::internal |
| OLD | NEW |