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

Side by Side Diff: src/deoptimizer.cc

Issue 1105653002: Fix -Wsign-compare bugs with GCC 4.9.2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after
2250 PrintF(trace_scope_->file(), 2250 PrintF(trace_scope_->file(),
2251 " object @0x%08" V8PRIxPTR ": [field #%d] <- ", 2251 " object @0x%08" V8PRIxPTR ": [field #%d] <- ",
2252 reinterpret_cast<intptr_t>(object_slot), field_index); 2252 reinterpret_cast<intptr_t>(object_slot), field_index);
2253 PrintF(trace_scope_->file(), "%" V8PRIuPTR " ; bool %s (%s)\n", value, 2253 PrintF(trace_scope_->file(), "%" V8PRIuPTR " ; bool %s (%s)\n", value,
2254 converter.NameOfCPURegister(input_reg), TraceValueType(is_smi)); 2254 converter.NameOfCPURegister(input_reg), TraceValueType(is_smi));
2255 } 2255 }
2256 if (value == 0) { 2256 if (value == 0) {
2257 AddObjectTaggedValue( 2257 AddObjectTaggedValue(
2258 reinterpret_cast<intptr_t>(isolate_->heap()->false_value())); 2258 reinterpret_cast<intptr_t>(isolate_->heap()->false_value()));
2259 } else { 2259 } else {
2260 DCHECK_EQ(1, value); 2260 DCHECK_EQ(1U, value);
2261 AddObjectTaggedValue( 2261 AddObjectTaggedValue(
2262 reinterpret_cast<intptr_t>(isolate_->heap()->true_value())); 2262 reinterpret_cast<intptr_t>(isolate_->heap()->true_value()));
2263 } 2263 }
2264 return; 2264 return;
2265 } 2265 }
2266 2266
2267 case Translation::DOUBLE_REGISTER: { 2267 case Translation::DOUBLE_REGISTER: {
2268 int input_reg = iterator->Next(); 2268 int input_reg = iterator->Next();
2269 double value = input_->GetDoubleRegister(input_reg); 2269 double value = input_->GetDoubleRegister(input_reg);
2270 if (trace_scope_ != NULL) { 2270 if (trace_scope_ != NULL) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 PrintF(trace_scope_->file(), 2360 PrintF(trace_scope_->file(),
2361 " object @0x%08" V8PRIxPTR ": [field #%d] <- ", 2361 " object @0x%08" V8PRIxPTR ": [field #%d] <- ",
2362 reinterpret_cast<intptr_t>(object_slot), field_index); 2362 reinterpret_cast<intptr_t>(object_slot), field_index);
2363 PrintF(trace_scope_->file(), "%" V8PRIuPTR " ; [sp + %d] (bool %s)\n", 2363 PrintF(trace_scope_->file(), "%" V8PRIuPTR " ; [sp + %d] (bool %s)\n",
2364 value, input_offset, TraceValueType(is_smi)); 2364 value, input_offset, TraceValueType(is_smi));
2365 } 2365 }
2366 if (value == 0) { 2366 if (value == 0) {
2367 AddObjectTaggedValue( 2367 AddObjectTaggedValue(
2368 reinterpret_cast<intptr_t>(isolate_->heap()->false_value())); 2368 reinterpret_cast<intptr_t>(isolate_->heap()->false_value()));
2369 } else { 2369 } else {
2370 DCHECK_EQ(1, value); 2370 DCHECK_EQ(1U, value);
2371 AddObjectTaggedValue( 2371 AddObjectTaggedValue(
2372 reinterpret_cast<intptr_t>(isolate_->heap()->true_value())); 2372 reinterpret_cast<intptr_t>(isolate_->heap()->true_value()));
2373 } 2373 }
2374 return; 2374 return;
2375 } 2375 }
2376 2376
2377 case Translation::DOUBLE_STACK_SLOT: { 2377 case Translation::DOUBLE_STACK_SLOT: {
2378 int input_slot_index = iterator->Next(); 2378 int input_slot_index = iterator->Next();
2379 unsigned input_offset = input_->GetOffsetFromSlotIndex(input_slot_index); 2379 unsigned input_offset = input_->GetOffsetFromSlotIndex(input_slot_index);
2380 double value = input_->GetDoubleFrameSlot(input_offset); 2380 double value = input_->GetDoubleFrameSlot(input_offset);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 " ; bool %s (%s)\n", 2566 " ; bool %s (%s)\n",
2567 output_[frame_index]->GetTop() + output_offset, output_offset, 2567 output_[frame_index]->GetTop() + output_offset, output_offset,
2568 value, converter.NameOfCPURegister(input_reg), 2568 value, converter.NameOfCPURegister(input_reg),
2569 TraceValueType(is_smi)); 2569 TraceValueType(is_smi));
2570 } 2570 }
2571 if (value == 0) { 2571 if (value == 0) {
2572 output_[frame_index]->SetFrameSlot( 2572 output_[frame_index]->SetFrameSlot(
2573 output_offset, 2573 output_offset,
2574 reinterpret_cast<intptr_t>(isolate_->heap()->false_value())); 2574 reinterpret_cast<intptr_t>(isolate_->heap()->false_value()));
2575 } else { 2575 } else {
2576 DCHECK_EQ(1, value); 2576 DCHECK_EQ(1U, value);
2577 output_[frame_index]->SetFrameSlot( 2577 output_[frame_index]->SetFrameSlot(
2578 output_offset, 2578 output_offset,
2579 reinterpret_cast<intptr_t>(isolate_->heap()->true_value())); 2579 reinterpret_cast<intptr_t>(isolate_->heap()->true_value()));
2580 } 2580 }
2581 return; 2581 return;
2582 } 2582 }
2583 2583
2584 case Translation::DOUBLE_REGISTER: { 2584 case Translation::DOUBLE_REGISTER: {
2585 int input_reg = iterator->Next(); 2585 int input_reg = iterator->Next();
2586 double value = input_->GetDoubleRegister(input_reg); 2586 double value = input_->GetDoubleRegister(input_reg);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2692 output_[frame_index]->GetTop() + output_offset); 2692 output_[frame_index]->GetTop() + output_offset);
2693 PrintF(trace_scope_->file(), 2693 PrintF(trace_scope_->file(),
2694 "[top + %d] <- %" V8PRIuPTR " ; [sp + %d] (uint32 %s)\n", 2694 "[top + %d] <- %" V8PRIuPTR " ; [sp + %d] (uint32 %s)\n",
2695 output_offset, value, input_offset, TraceValueType(is_smi)); 2695 output_offset, value, input_offset, TraceValueType(is_smi));
2696 } 2696 }
2697 if (value == 0) { 2697 if (value == 0) {
2698 output_[frame_index]->SetFrameSlot( 2698 output_[frame_index]->SetFrameSlot(
2699 output_offset, 2699 output_offset,
2700 reinterpret_cast<intptr_t>(isolate_->heap()->false_value())); 2700 reinterpret_cast<intptr_t>(isolate_->heap()->false_value()));
2701 } else { 2701 } else {
2702 DCHECK_EQ(1, value); 2702 DCHECK_EQ(1U, value);
2703 output_[frame_index]->SetFrameSlot( 2703 output_[frame_index]->SetFrameSlot(
2704 output_offset, 2704 output_offset,
2705 reinterpret_cast<intptr_t>(isolate_->heap()->true_value())); 2705 reinterpret_cast<intptr_t>(isolate_->heap()->true_value()));
2706 } 2706 }
2707 return; 2707 return;
2708 } 2708 }
2709 2709
2710 case Translation::DOUBLE_STACK_SLOT: { 2710 case Translation::DOUBLE_STACK_SLOT: {
2711 int input_slot_index = iterator->Next(); 2711 int input_slot_index = iterator->Next();
2712 unsigned input_offset = input_->GetOffsetFromSlotIndex(input_slot_index); 2712 unsigned input_offset = input_->GetOffsetFromSlotIndex(input_slot_index);
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
3449 3449
3450 case BOOLBIT: { 3450 case BOOLBIT: {
3451 #if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT 3451 #if V8_TARGET_BIG_ENDIAN && V8_HOST_ARCH_64_BIT
3452 uint32_t value = Memory::uint32_at(addr_ + kIntSize); 3452 uint32_t value = Memory::uint32_at(addr_ + kIntSize);
3453 #else 3453 #else
3454 uint32_t value = Memory::uint32_at(addr_); 3454 uint32_t value = Memory::uint32_at(addr_);
3455 #endif 3455 #endif
3456 if (value == 0) { 3456 if (value == 0) {
3457 return isolate->factory()->false_value(); 3457 return isolate->factory()->false_value();
3458 } else { 3458 } else {
3459 DCHECK_EQ(1, value); 3459 DCHECK_EQ(1U, value);
3460 return isolate->factory()->true_value(); 3460 return isolate->factory()->true_value();
3461 } 3461 }
3462 } 3462 }
3463 3463
3464 case DOUBLE: { 3464 case DOUBLE: {
3465 double value = read_double_value(addr_); 3465 double value = read_double_value(addr_);
3466 return isolate->factory()->NewNumber(value); 3466 return isolate->factory()->NewNumber(value);
3467 } 3467 }
3468 3468
3469 case LITERAL: 3469 case LITERAL:
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 int raw_position = static_cast<int>(info->data()); 3800 int raw_position = static_cast<int>(info->data());
3801 last_position = raw_position ? SourcePosition::FromRaw(raw_position) 3801 last_position = raw_position ? SourcePosition::FromRaw(raw_position)
3802 : SourcePosition::Unknown(); 3802 : SourcePosition::Unknown();
3803 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { 3803 } else if (info->rmode() == RelocInfo::DEOPT_REASON) {
3804 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); 3804 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data());
3805 } 3805 }
3806 } 3806 }
3807 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); 3807 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason);
3808 } 3808 }
3809 } } // namespace v8::internal 3809 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698