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

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

Issue 27802002: Disconnects code objects from infrequently used unoptimized functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/code_generator.cc ('k') | runtime/vm/flow_graph_compiler_ia32.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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"
11 #include "vm/compiler.h"
11 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
12 #include "vm/deopt_instructions.h" 13 #include "vm/deopt_instructions.h"
13 #include "vm/il_printer.h" 14 #include "vm/il_printer.h"
14 #include "vm/locations.h" 15 #include "vm/locations.h"
15 #include "vm/object_store.h" 16 #include "vm/object_store.h"
16 #include "vm/parser.h" 17 #include "vm/parser.h"
17 #include "vm/stack_frame.h" 18 #include "vm/stack_frame.h"
18 #include "vm/stub_code.h" 19 #include "vm/stub_code.h"
19 #include "vm/symbols.h" 20 #include "vm/symbols.h"
20 21
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 __ cmp(R4, ShifterOperand(R0)); 1362 __ cmp(R4, ShifterOperand(R0));
1362 __ b(&update, NE); 1363 __ b(&update, NE);
1363 1364
1364 __ Bind(&call_target_function); 1365 __ Bind(&call_target_function);
1365 // Call the target found in the cache. For a class id match, this is a 1366 // Call the target found in the cache. For a class id match, this is a
1366 // proper target for the given name and arguments descriptor. If the 1367 // proper target for the given name and arguments descriptor. If the
1367 // illegal class id was found, the target is a cache miss handler that can 1368 // illegal class id was found, the target is a cache miss handler that can
1368 // be invoked as a normal Dart function. 1369 // be invoked as a normal Dart function.
1369 __ add(IP, R2, ShifterOperand(R3, LSL, 2)); 1370 __ add(IP, R2, ShifterOperand(R3, LSL, 2));
1370 __ ldr(R0, FieldAddress(IP, base + kWordSize)); 1371 __ ldr(R0, FieldAddress(IP, base + kWordSize));
1371 __ ldr(R0, FieldAddress(R0, Function::code_offset())); 1372 __ ldr(R1, FieldAddress(R0, Function::code_offset()));
1372 __ ldr(R0, FieldAddress(R0, Code::instructions_offset())); 1373 if (FLAG_collect_code) {
1374 // If we are collecting code, the code object may be null.
1375 Label is_compiled;
1376 __ CompareImmediate(R1, reinterpret_cast<intptr_t>(Object::null()));
1377 __ b(&is_compiled, NE);
1378 __ BranchLink(&StubCode::CompileFunctionRuntimeCallLabel());
1379 // R0: target function.
1380 __ ldr(R1, FieldAddress(R0, Function::code_offset()));
1381 __ Bind(&is_compiled);
1382 }
1383 __ ldr(R0, FieldAddress(R1, Code::instructions_offset()));
1373 __ LoadObject(R5, ic_data); 1384 __ LoadObject(R5, ic_data);
1374 __ LoadObject(R4, arguments_descriptor); 1385 __ LoadObject(R4, arguments_descriptor);
1375 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag); 1386 __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag);
1376 __ blx(R0); 1387 __ blx(R0);
1377 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); 1388 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos);
1378 RecordSafepoint(locs); 1389 RecordSafepoint(locs);
1379 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); 1390 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos);
1380 __ Drop(argument_count); 1391 __ Drop(argument_count);
1381 } 1392 }
1382 1393
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 DRegister dreg = EvenDRegisterOf(reg); 1922 DRegister dreg = EvenDRegisterOf(reg);
1912 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1923 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1913 } 1924 }
1914 1925
1915 1926
1916 #undef __ 1927 #undef __
1917 1928
1918 } // namespace dart 1929 } // namespace dart
1919 1930
1920 #endif // defined TARGET_ARCH_ARM 1931 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698