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

Side by Side Diff: runtime/vm/flow_graph_compiler_mips.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, 1 month 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"
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 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 1406
1406 ASSERT(kIllegalCid == 0); 1407 ASSERT(kIllegalCid == 0);
1407 __ beq(T4, ZR, &call_target_function); 1408 __ beq(T4, ZR, &call_target_function);
1408 __ bne(T4, T0, &update); 1409 __ bne(T4, T0, &update);
1409 1410
1410 __ Bind(&call_target_function); 1411 __ Bind(&call_target_function);
1411 // Call the target found in the cache. For a class id match, this is a 1412 // Call the target found in the cache. For a class id match, this is a
1412 // proper target for the given name and arguments descriptor. If the 1413 // proper target for the given name and arguments descriptor. If the
1413 // illegal class id was found, the target is a cache miss handler that can 1414 // illegal class id was found, the target is a cache miss handler that can
1414 // be invoked as a normal Dart function. 1415 // be invoked as a normal Dart function.
1415 __ sll(TMP1, T3, 2); 1416 __ sll(T1, T3, 2);
1416 __ addu(TMP1, T2, TMP1); 1417 __ addu(T1, T2, T1);
1417 __ lw(T0, FieldAddress(TMP, base + kWordSize)); 1418 __ lw(T0, FieldAddress(T1, base + kWordSize));
1418 __ lw(T0, FieldAddress(T0, Function::code_offset())); 1419 __ lw(T1, FieldAddress(T0, Function::code_offset()));
1419 __ lw(T0, FieldAddress(T0, Code::instructions_offset())); 1420 if (FLAG_collect_code) {
1421 // If we are collecting code, the code object may be null.
1422 Label is_compiled;
1423 __ BranchNotEqual(T1, reinterpret_cast<int32_t>(Object::null()),
1424 &is_compiled);
1425 __ BranchLink(&StubCode::CompileFunctionRuntimeCallLabel());
1426 __ lw(T1, FieldAddress(T0, Function::code_offset()));
1427 __ Bind(&is_compiled);
1428 }
1429 __ lw(T0, FieldAddress(T1, Code::instructions_offset()));
1420 __ LoadObject(S5, ic_data); 1430 __ LoadObject(S5, ic_data);
1421 __ LoadObject(S4, arguments_descriptor); 1431 __ LoadObject(S4, arguments_descriptor);
1422 __ AddImmediate(T0, Instructions::HeaderSize() - kHeapObjectTag); 1432 __ AddImmediate(T0, Instructions::HeaderSize() - kHeapObjectTag);
1423 __ jalr(T0); 1433 __ jalr(T0);
1424 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); 1434 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos);
1425 RecordSafepoint(locs); 1435 RecordSafepoint(locs);
1426 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); 1436 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos);
1427 __ Drop(argument_count); 1437 __ Drop(argument_count);
1428 } 1438 }
1429 1439
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 __ AddImmediate(SP, kDoubleSize); 2016 __ AddImmediate(SP, kDoubleSize);
2007 } 2017 }
2008 2018
2009 2019
2010 #undef __ 2020 #undef __
2011 2021
2012 2022
2013 } // namespace dart 2023 } // namespace dart
2014 2024
2015 #endif // defined TARGET_ARCH_MIPS 2025 #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