Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 131513016: Merged r18697 into 3.22 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.22
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 Heap* heap = Handle<HeapObject>::cast(handle)->GetHeap(); 2446 Heap* heap = Handle<HeapObject>::cast(handle)->GetHeap();
2447 is_not_in_new_space_ = !heap->InNewSpace(*handle); 2447 is_not_in_new_space_ = !heap->InNewSpace(*handle);
2448 } 2448 }
2449 if (handle->IsNumber()) { 2449 if (handle->IsNumber()) {
2450 double n = handle->Number(); 2450 double n = handle->Number();
2451 has_int32_value_ = IsInteger32(n); 2451 has_int32_value_ = IsInteger32(n);
2452 int32_value_ = DoubleToInt32(n); 2452 int32_value_ = DoubleToInt32(n);
2453 has_smi_value_ = has_int32_value_ && Smi::IsValid(int32_value_); 2453 has_smi_value_ = has_int32_value_ && Smi::IsValid(int32_value_);
2454 double_value_ = n; 2454 double_value_ = n;
2455 has_double_value_ = true; 2455 has_double_value_ = true;
2456 // TODO(titzer): if this heap number is new space, tenure a new one.
2456 } else { 2457 } else {
2457 is_internalized_string_ = handle->IsInternalizedString(); 2458 is_internalized_string_ = handle->IsInternalizedString();
2458 } 2459 }
2459 2460
2460 is_cell_ = !handle.is_null() && 2461 is_cell_ = !handle.is_null() &&
2461 (handle->IsCell() || handle->IsPropertyCell()); 2462 (handle->IsCell() || handle->IsPropertyCell());
2462 Initialize(r); 2463 Initialize(r);
2463 } 2464 }
2464 2465
2465 2466
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 if (has_int32_value_) { 2645 if (has_int32_value_) {
2645 stream->Add("%d ", int32_value_); 2646 stream->Add("%d ", int32_value_);
2646 } else if (has_double_value_) { 2647 } else if (has_double_value_) {
2647 stream->Add("%f ", FmtElm(double_value_)); 2648 stream->Add("%f ", FmtElm(double_value_));
2648 } else if (has_external_reference_value_) { 2649 } else if (has_external_reference_value_) {
2649 stream->Add("%p ", reinterpret_cast<void*>( 2650 stream->Add("%p ", reinterpret_cast<void*>(
2650 external_reference_value_.address())); 2651 external_reference_value_.address()));
2651 } else { 2652 } else {
2652 handle(Isolate::Current())->ShortPrint(stream); 2653 handle(Isolate::Current())->ShortPrint(stream);
2653 } 2654 }
2655 if (!is_not_in_new_space_) {
2656 stream->Add("[new space] ");
2657 }
2654 } 2658 }
2655 2659
2656 2660
2657 void HBinaryOperation::PrintDataTo(StringStream* stream) { 2661 void HBinaryOperation::PrintDataTo(StringStream* stream) {
2658 left()->PrintNameTo(stream); 2662 left()->PrintNameTo(stream);
2659 stream->Add(" "); 2663 stream->Add(" ");
2660 right()->PrintNameTo(stream); 2664 right()->PrintNameTo(stream);
2661 if (CheckFlag(kCanOverflow)) stream->Add(" !"); 2665 if (CheckFlag(kCanOverflow)) stream->Add(" !");
2662 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); 2666 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
2663 } 2667 }
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
4288 break; 4292 break;
4289 case kExternalMemory: 4293 case kExternalMemory:
4290 stream->Add("[external-memory]"); 4294 stream->Add("[external-memory]");
4291 break; 4295 break;
4292 } 4296 }
4293 4297
4294 stream->Add("@%d", offset()); 4298 stream->Add("@%d", offset());
4295 } 4299 }
4296 4300
4297 } } // namespace v8::internal 4301 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698