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

Side by Side Diff: src/deoptimizer.cc

Issue 1365073002: Revert of Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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-configuration.cc ('k') | src/frames.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/deoptimizer.h" 5 #include "src/deoptimizer.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/disasm.h" 10 #include "src/disasm.h"
(...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 2065
2066 2066
2067 void Translation::StoreBoolRegister(Register reg) { 2067 void Translation::StoreBoolRegister(Register reg) {
2068 buffer_->Add(BOOL_REGISTER, zone()); 2068 buffer_->Add(BOOL_REGISTER, zone());
2069 buffer_->Add(reg.code(), zone()); 2069 buffer_->Add(reg.code(), zone());
2070 } 2070 }
2071 2071
2072 2072
2073 void Translation::StoreDoubleRegister(DoubleRegister reg) { 2073 void Translation::StoreDoubleRegister(DoubleRegister reg) {
2074 buffer_->Add(DOUBLE_REGISTER, zone()); 2074 buffer_->Add(DOUBLE_REGISTER, zone());
2075 buffer_->Add(reg.code(), zone()); 2075 buffer_->Add(DoubleRegister::ToAllocationIndex(reg), zone());
2076 } 2076 }
2077 2077
2078 2078
2079 void Translation::StoreStackSlot(int index) { 2079 void Translation::StoreStackSlot(int index) {
2080 buffer_->Add(STACK_SLOT, zone()); 2080 buffer_->Add(STACK_SLOT, zone());
2081 buffer_->Add(index, zone()); 2081 buffer_->Add(index, zone());
2082 } 2082 }
2083 2083
2084 2084
2085 void Translation::StoreInt32StackSlot(int index) { 2085 void Translation::StoreInt32StackSlot(int index) {
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 } 2918 }
2919 return TranslatedValue::NewBool(this, static_cast<uint32_t>(value)); 2919 return TranslatedValue::NewBool(this, static_cast<uint32_t>(value));
2920 } 2920 }
2921 2921
2922 case Translation::DOUBLE_REGISTER: { 2922 case Translation::DOUBLE_REGISTER: {
2923 int input_reg = iterator->Next(); 2923 int input_reg = iterator->Next();
2924 if (registers == nullptr) return TranslatedValue::NewInvalid(this); 2924 if (registers == nullptr) return TranslatedValue::NewInvalid(this);
2925 double value = registers->GetDoubleRegister(input_reg); 2925 double value = registers->GetDoubleRegister(input_reg);
2926 if (trace_file != nullptr) { 2926 if (trace_file != nullptr) {
2927 PrintF(trace_file, "%e ; %s (bool)", value, 2927 PrintF(trace_file, "%e ; %s (bool)", value,
2928 DoubleRegister::from_code(input_reg).ToString()); 2928 DoubleRegister::AllocationIndexToString(input_reg));
2929 } 2929 }
2930 return TranslatedValue::NewDouble(this, value); 2930 return TranslatedValue::NewDouble(this, value);
2931 } 2931 }
2932 2932
2933 case Translation::STACK_SLOT: { 2933 case Translation::STACK_SLOT: {
2934 int slot_offset = 2934 int slot_offset =
2935 OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next()); 2935 OptimizedFrame::StackSlotOffsetRelativeToFp(iterator->Next());
2936 intptr_t value = *(reinterpret_cast<intptr_t*>(fp + slot_offset)); 2936 intptr_t value = *(reinterpret_cast<intptr_t*>(fp + slot_offset));
2937 if (trace_file != nullptr) { 2937 if (trace_file != nullptr) {
2938 PrintF(trace_file, "0x%08" V8PRIxPTR " ; [fp %c %d] ", value, 2938 PrintF(trace_file, "0x%08" V8PRIxPTR " ; [fp %c %d] ", value,
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
3412 DCHECK(value_info->IsMaterializedObject()); 3412 DCHECK(value_info->IsMaterializedObject());
3413 3413
3414 value_info->value_ = 3414 value_info->value_ =
3415 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3415 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3416 } 3416 }
3417 } 3417 }
3418 } 3418 }
3419 3419
3420 } // namespace internal 3420 } // namespace internal
3421 } // namespace v8 3421 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-configuration.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698