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

Side by Side Diff: src/deoptimizer.cc

Issue 1077113002: Treat HArgumentsObject as a safe use during Uint32 analysis phase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove assertOptimized 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 | « no previous file | src/hydrogen-uint32-analysis.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 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 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 2216
2217 case Translation::UINT32_REGISTER: { 2217 case Translation::UINT32_REGISTER: {
2218 int input_reg = iterator->Next(); 2218 int input_reg = iterator->Next();
2219 uintptr_t value = static_cast<uintptr_t>(input_->GetRegister(input_reg)); 2219 uintptr_t value = static_cast<uintptr_t>(input_->GetRegister(input_reg));
2220 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); 2220 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue));
2221 if (trace_scope_ != NULL) { 2221 if (trace_scope_ != NULL) {
2222 PrintF(trace_scope_->file(), 2222 PrintF(trace_scope_->file(),
2223 " object @0x%08" V8PRIxPTR ": [field #%d] <- ", 2223 " object @0x%08" V8PRIxPTR ": [field #%d] <- ",
2224 reinterpret_cast<intptr_t>(object_slot), 2224 reinterpret_cast<intptr_t>(object_slot),
2225 field_index); 2225 field_index);
2226 PrintF(trace_scope_->file(), 2226 PrintF(trace_scope_->file(), "%" V8PRIuPTR " ; uint %s (%s)\n", value,
2227 "%" V8PRIdPTR " ; uint %s (%s)\n", value, 2227 converter.NameOfCPURegister(input_reg), TraceValueType(is_smi));
2228 converter.NameOfCPURegister(input_reg),
2229 TraceValueType(is_smi));
2230 } 2228 }
2231 if (is_smi) { 2229 if (is_smi) {
2232 intptr_t tagged_value = 2230 intptr_t tagged_value =
2233 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); 2231 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
2234 AddObjectTaggedValue(tagged_value); 2232 AddObjectTaggedValue(tagged_value);
2235 } else { 2233 } else {
2236 double double_value = static_cast<double>(static_cast<uint32_t>(value)); 2234 double double_value = static_cast<double>(static_cast<uint32_t>(value));
2237 AddObjectDoubleValue(double_value); 2235 AddObjectDoubleValue(double_value);
2238 } 2236 }
2239 return; 2237 return;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 int input_slot_index = iterator->Next(); 2302 int input_slot_index = iterator->Next();
2305 unsigned input_offset = input_->GetOffsetFromSlotIndex(input_slot_index); 2303 unsigned input_offset = input_->GetOffsetFromSlotIndex(input_slot_index);
2306 uintptr_t value = 2304 uintptr_t value =
2307 static_cast<uintptr_t>(input_->GetFrameSlot(input_offset)); 2305 static_cast<uintptr_t>(input_->GetFrameSlot(input_offset));
2308 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); 2306 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue));
2309 if (trace_scope_ != NULL) { 2307 if (trace_scope_ != NULL) {
2310 PrintF(trace_scope_->file(), 2308 PrintF(trace_scope_->file(),
2311 " object @0x%08" V8PRIxPTR ": [field #%d] <- ", 2309 " object @0x%08" V8PRIxPTR ": [field #%d] <- ",
2312 reinterpret_cast<intptr_t>(object_slot), 2310 reinterpret_cast<intptr_t>(object_slot),
2313 field_index); 2311 field_index);
2314 PrintF(trace_scope_->file(), 2312 PrintF(trace_scope_->file(), "%" V8PRIuPTR " ; [sp + %d] (uint %s)\n",
2315 "%" V8PRIdPTR " ; [sp + %d] (uint %s)\n",
2316 value, input_offset, TraceValueType(is_smi)); 2313 value, input_offset, TraceValueType(is_smi));
2317 } 2314 }
2318 if (is_smi) { 2315 if (is_smi) {
2319 intptr_t tagged_value = 2316 intptr_t tagged_value =
2320 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); 2317 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value)));
2321 AddObjectTaggedValue(tagged_value); 2318 AddObjectTaggedValue(tagged_value);
2322 } else { 2319 } else {
2323 double double_value = static_cast<double>(static_cast<uint32_t>(value)); 2320 double double_value = static_cast<double>(static_cast<uint32_t>(value));
2324 AddObjectDoubleValue(double_value); 2321 AddObjectDoubleValue(double_value);
2325 } 2322 }
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
3660 int raw_position = static_cast<int>(info->data()); 3657 int raw_position = static_cast<int>(info->data());
3661 last_position = raw_position ? SourcePosition::FromRaw(raw_position) 3658 last_position = raw_position ? SourcePosition::FromRaw(raw_position)
3662 : SourcePosition::Unknown(); 3659 : SourcePosition::Unknown();
3663 } else if (info->rmode() == RelocInfo::DEOPT_REASON) { 3660 } else if (info->rmode() == RelocInfo::DEOPT_REASON) {
3664 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data()); 3661 last_reason = static_cast<Deoptimizer::DeoptReason>(info->data());
3665 } 3662 }
3666 } 3663 }
3667 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason); 3664 return DeoptInfo(SourcePosition::Unknown(), NULL, Deoptimizer::kNoReason);
3668 } 3665 }
3669 } } // namespace v8::internal 3666 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-uint32-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698