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 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 Heap* heap = Handle<HeapObject>::cast(handle)->GetHeap(); | 2524 Heap* heap = Handle<HeapObject>::cast(handle)->GetHeap(); |
2525 is_not_in_new_space_ = !heap->InNewSpace(*handle); | 2525 is_not_in_new_space_ = !heap->InNewSpace(*handle); |
2526 } | 2526 } |
2527 if (handle->IsNumber()) { | 2527 if (handle->IsNumber()) { |
2528 double n = handle->Number(); | 2528 double n = handle->Number(); |
2529 has_int32_value_ = IsInteger32(n); | 2529 has_int32_value_ = IsInteger32(n); |
2530 int32_value_ = DoubleToInt32(n); | 2530 int32_value_ = DoubleToInt32(n); |
2531 has_smi_value_ = has_int32_value_ && Smi::IsValid(int32_value_); | 2531 has_smi_value_ = has_int32_value_ && Smi::IsValid(int32_value_); |
2532 double_value_ = n; | 2532 double_value_ = n; |
2533 has_double_value_ = true; | 2533 has_double_value_ = true; |
| 2534 // TODO(titzer): if this heap number is new space, tenure a new one. |
2534 } else { | 2535 } else { |
2535 is_internalized_string_ = handle->IsInternalizedString(); | 2536 is_internalized_string_ = handle->IsInternalizedString(); |
2536 } | 2537 } |
2537 | 2538 |
2538 is_cell_ = !handle.is_null() && | 2539 is_cell_ = !handle.is_null() && |
2539 (handle->IsCell() || handle->IsPropertyCell()); | 2540 (handle->IsCell() || handle->IsPropertyCell()); |
2540 Initialize(r); | 2541 Initialize(r); |
2541 } | 2542 } |
2542 | 2543 |
2543 | 2544 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2722 if (has_int32_value_) { | 2723 if (has_int32_value_) { |
2723 stream->Add("%d ", int32_value_); | 2724 stream->Add("%d ", int32_value_); |
2724 } else if (has_double_value_) { | 2725 } else if (has_double_value_) { |
2725 stream->Add("%f ", FmtElm(double_value_)); | 2726 stream->Add("%f ", FmtElm(double_value_)); |
2726 } else if (has_external_reference_value_) { | 2727 } else if (has_external_reference_value_) { |
2727 stream->Add("%p ", reinterpret_cast<void*>( | 2728 stream->Add("%p ", reinterpret_cast<void*>( |
2728 external_reference_value_.address())); | 2729 external_reference_value_.address())); |
2729 } else { | 2730 } else { |
2730 handle(Isolate::Current())->ShortPrint(stream); | 2731 handle(Isolate::Current())->ShortPrint(stream); |
2731 } | 2732 } |
| 2733 if (!is_not_in_new_space_) { |
| 2734 stream->Add("[new space] "); |
| 2735 } |
2732 } | 2736 } |
2733 | 2737 |
2734 | 2738 |
2735 void HBinaryOperation::PrintDataTo(StringStream* stream) { | 2739 void HBinaryOperation::PrintDataTo(StringStream* stream) { |
2736 left()->PrintNameTo(stream); | 2740 left()->PrintNameTo(stream); |
2737 stream->Add(" "); | 2741 stream->Add(" "); |
2738 right()->PrintNameTo(stream); | 2742 right()->PrintNameTo(stream); |
2739 if (CheckFlag(kCanOverflow)) stream->Add(" !"); | 2743 if (CheckFlag(kCanOverflow)) stream->Add(" !"); |
2740 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); | 2744 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); |
2741 } | 2745 } |
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4443 break; | 4447 break; |
4444 case kExternalMemory: | 4448 case kExternalMemory: |
4445 stream->Add("[external-memory]"); | 4449 stream->Add("[external-memory]"); |
4446 break; | 4450 break; |
4447 } | 4451 } |
4448 | 4452 |
4449 stream->Add("@%d", offset()); | 4453 stream->Add("@%d", offset()); |
4450 } | 4454 } |
4451 | 4455 |
4452 } } // namespace v8::internal | 4456 } } // namespace v8::internal |
OLD | NEW |