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

Side by Side Diff: runtime/vm/deopt_instructions.cc

Issue 14812005: Cleanup deoptimization code to make it architecture independent (in progress). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/deopt_instructions.h" 5 #include "vm/deopt_instructions.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/locations.h" 10 #include "vm/locations.h"
(...skipping 22 matching lines...) Expand all
33 isolate_(Isolate::Current()) { 33 isolate_(Isolate::Current()) {
34 from_frame_ = isolate_->deopt_frame_copy(); 34 from_frame_ = isolate_->deopt_frame_copy();
35 from_frame_size_ = isolate_->deopt_frame_copy_size(); 35 from_frame_size_ = isolate_->deopt_frame_copy_size();
36 registers_copy_ = isolate_->deopt_cpu_registers_copy(); 36 registers_copy_ = isolate_->deopt_cpu_registers_copy();
37 fpu_registers_copy_ = isolate_->deopt_fpu_registers_copy(); 37 fpu_registers_copy_ = isolate_->deopt_fpu_registers_copy();
38 caller_fp_ = GetFromFp(); 38 caller_fp_ = GetFromFp();
39 } 39 }
40 40
41 41
42 intptr_t DeoptimizationContext::GetFromFp() const { 42 intptr_t DeoptimizationContext::GetFromFp() const {
43 return from_frame_[from_frame_size_ - 1 - num_args_ - 1]; 43 return from_frame_[from_frame_size_ - num_args_ - kLastParamSlotIndex];
44 } 44 }
45 45
46 46
47 intptr_t DeoptimizationContext::GetFromPc() const { 47 intptr_t DeoptimizationContext::GetFromPc() const {
48 return from_frame_[from_frame_size_ - 1 - num_args_]; 48 return from_frame_[from_frame_size_ - num_args_ + kPcSlotIndexFromSp];
49 } 49 }
50 50
51 intptr_t DeoptimizationContext::GetCallerFp() const { 51 intptr_t DeoptimizationContext::GetCallerFp() const {
52 return caller_fp_; 52 return caller_fp_;
53 } 53 }
54 54
55 void DeoptimizationContext::SetCallerFp(intptr_t caller_fp) { 55 void DeoptimizationContext::SetCallerFp(intptr_t caller_fp) {
56 caller_fp_ = caller_fp; 56 caller_fp_ = caller_fp;
57 } 57 }
58 58
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 Smi* offset, 926 Smi* offset,
927 DeoptInfo* info, 927 DeoptInfo* info,
928 Smi* reason) { 928 Smi* reason) {
929 intptr_t i = index * kEntrySize; 929 intptr_t i = index * kEntrySize;
930 *offset ^= table.At(i); 930 *offset ^= table.At(i);
931 *info ^= table.At(i + 1); 931 *info ^= table.At(i + 1);
932 *reason ^= table.At(i + 2); 932 *reason ^= table.At(i + 2);
933 } 933 }
934 934
935 } // namespace dart 935 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698