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

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

Issue 23788012: Fix an off-by-one error in deoptimization compression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added changes to all platform files. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/object.h » ('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 (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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 } 39 }
40 40
41 41
42 bool FlowGraphCompiler::SupportsUnboxedMints() { 42 bool FlowGraphCompiler::SupportsUnboxedMints() {
43 return false; 43 return false;
44 } 44 }
45 45
46 46
47 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, 47 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
48 DeoptInfoBuilder* builder) { 48 DeoptInfoBuilder* builder,
49 const Array& deopt_table) {
49 if (deopt_env_ == NULL) return DeoptInfo::null(); 50 if (deopt_env_ == NULL) return DeoptInfo::null();
50 51
51 intptr_t stack_height = compiler->StackSize(); 52 intptr_t stack_height = compiler->StackSize();
52 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); 53 AllocateIncomingParametersRecursive(deopt_env_, &stack_height);
53 54
54 intptr_t slot_ix = 0; 55 intptr_t slot_ix = 0;
55 Environment* current = deopt_env_; 56 Environment* current = deopt_env_;
56 57
57 // Emit all kMaterializeObject instructions describing objects to be 58 // Emit all kMaterializeObject instructions describing objects to be
58 // materialized on the deoptimization as a prefix to the deoptimization info. 59 // materialized on the deoptimization as a prefix to the deoptimization info.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // PC marker. 123 // PC marker.
123 builder->AddPcMarker(previous->function(), slot_ix++); 124 builder->AddPcMarker(previous->function(), slot_ix++);
124 builder->AddCallerFp(slot_ix++); 125 builder->AddCallerFp(slot_ix++);
125 builder->AddCallerPc(slot_ix++); 126 builder->AddCallerPc(slot_ix++);
126 127
127 // For the outermost environment, set the incoming arguments. 128 // For the outermost environment, set the incoming arguments.
128 for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) { 129 for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) {
129 builder->AddCopy(previous->ValueAt(i), previous->LocationAt(i), slot_ix++); 130 builder->AddCopy(previous->ValueAt(i), previous->LocationAt(i), slot_ix++);
130 } 131 }
131 132
132 const DeoptInfo& deopt_info = DeoptInfo::Handle(builder->CreateDeoptInfo()); 133 const DeoptInfo& deopt_info =
134 DeoptInfo::Handle(builder->CreateDeoptInfo(deopt_table));
133 return deopt_info.raw(); 135 return deopt_info.raw();
134 } 136 }
135 137
136 138
137 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, 139 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler,
138 intptr_t stub_ix) { 140 intptr_t stub_ix) {
139 // Calls do not need stubs, they share a deoptimization trampoline. 141 // Calls do not need stubs, they share a deoptimization trampoline.
140 ASSERT(reason() != kDeoptAtCall); 142 ASSERT(reason() != kDeoptAtCall);
141 Assembler* assem = compiler->assembler(); 143 Assembler* assem = compiler->assembler();
142 #define __ assem-> 144 #define __ assem->
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 __ movups(reg, Address(RSP, 0)); 1935 __ movups(reg, Address(RSP, 0));
1934 __ addq(RSP, Immediate(kFpuRegisterSize)); 1936 __ addq(RSP, Immediate(kFpuRegisterSize));
1935 } 1937 }
1936 1938
1937 1939
1938 #undef __ 1940 #undef __
1939 1941
1940 } // namespace dart 1942 } // namespace dart
1941 1943
1942 #endif // defined TARGET_ARCH_X64 1944 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698