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

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

Issue 254723003: Remember all deopt reasons in ic_data, not just the last one. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.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 (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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 const DeoptInfo& deopt_info = 146 const DeoptInfo& deopt_info =
147 DeoptInfo::Handle(builder->CreateDeoptInfo(deopt_table)); 147 DeoptInfo::Handle(builder->CreateDeoptInfo(deopt_table));
148 return deopt_info.raw(); 148 return deopt_info.raw();
149 } 149 }
150 150
151 151
152 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, 152 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler,
153 intptr_t stub_ix) { 153 intptr_t stub_ix) {
154 // Calls do not need stubs, they share a deoptimization trampoline. 154 // Calls do not need stubs, they share a deoptimization trampoline.
155 ASSERT(reason() != kDeoptAtCall); 155 ASSERT(reason() != ICData::kDeoptAtCall);
156 Assembler* assem = compiler->assembler(); 156 Assembler* assem = compiler->assembler();
157 #define __ assem-> 157 #define __ assem->
158 __ Comment("Deopt stub for id %" Pd "", deopt_id()); 158 __ Comment("Deopt stub for id %" Pd "", deopt_id());
159 __ Bind(entry_label()); 159 __ Bind(entry_label());
160 if (FLAG_trap_on_deoptimization) __ break_(0); 160 if (FLAG_trap_on_deoptimization) __ break_(0);
161 161
162 ASSERT(deopt_env() != NULL); 162 ASSERT(deopt_env() != NULL);
163 163
164 __ BranchLink(&StubCode::DeoptimizeLabel()); 164 __ BranchLink(&StubCode::DeoptimizeLabel());
165 set_pc_offset(assem->CodeSize()); 165 set_pc_offset(assem->CodeSize());
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 num_args_checked = 2; 1350 num_args_checked = 2;
1351 } 1351 }
1352 const ICData& ic_data = ICData::ZoneHandle( 1352 const ICData& ic_data = ICData::ZoneHandle(
1353 ICData::New(parsed_function().function(), // Caller function. 1353 ICData::New(parsed_function().function(), // Caller function.
1354 String::Handle(target_function.name()), 1354 String::Handle(target_function.name()),
1355 arguments_descriptor, 1355 arguments_descriptor,
1356 deopt_id, 1356 deopt_id,
1357 num_args_checked)); // No arguments checked. 1357 num_args_checked)); // No arguments checked.
1358 ic_data.AddTarget(target_function); 1358 ic_data.AddTarget(target_function);
1359 uword label_address = 0; 1359 uword label_address = 0;
1360 if (ic_data.num_args_tested() == 0) { 1360 if (ic_data.NumArgsTested() == 0) {
1361 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); 1361 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint();
1362 } else if (ic_data.num_args_tested() == 2) { 1362 } else if (ic_data.NumArgsTested() == 2) {
1363 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); 1363 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint();
1364 } else { 1364 } else {
1365 UNIMPLEMENTED(); 1365 UNIMPLEMENTED();
1366 } 1366 }
1367 ExternalLabel target_label("StaticCallICStub", label_address); 1367 ExternalLabel target_label("StaticCallICStub", label_address);
1368 __ LoadObject(S5, ic_data); 1368 __ LoadObject(S5, ic_data);
1369 GenerateDartCall(deopt_id, 1369 GenerateDartCall(deopt_id,
1370 token_pos, 1370 token_pos,
1371 &target_label, 1371 &target_label,
1372 PcDescriptors::kUnoptStaticCall, 1372 PcDescriptors::kUnoptStaticCall,
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 __ AddImmediate(SP, kDoubleSize); 1845 __ AddImmediate(SP, kDoubleSize);
1846 } 1846 }
1847 1847
1848 1848
1849 #undef __ 1849 #undef __
1850 1850
1851 1851
1852 } // namespace dart 1852 } // namespace dart
1853 1853
1854 #endif // defined TARGET_ARCH_MIPS 1854 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698