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

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

Issue 22825023: Uses an object pool on x64 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
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 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 __ LoadObject(S4, arguments_descriptor); 1431 __ LoadObject(S4, arguments_descriptor);
1432 __ AddImmediate(T0, Instructions::HeaderSize() - kHeapObjectTag); 1432 __ AddImmediate(T0, Instructions::HeaderSize() - kHeapObjectTag);
1433 __ jalr(T0); 1433 __ jalr(T0);
1434 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); 1434 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos);
1435 RecordSafepoint(locs); 1435 RecordSafepoint(locs);
1436 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); 1436 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos);
1437 __ Drop(argument_count); 1437 __ Drop(argument_count);
1438 } 1438 }
1439 1439
1440 1440
1441 void FlowGraphCompiler::EmitUnoptimizedStaticCall(
1442 const Function& target_function,
1443 const Array& arguments_descriptor,
1444 intptr_t argument_count,
1445 intptr_t deopt_id,
1446 intptr_t token_pos,
1447 LocationSummary* locs) {
1448 // TODO(srdjan): Improve performance of function recognition.
1449 MethodRecognizer::Kind recognized_kind =
1450 MethodRecognizer::RecognizeKind(target_function);
1451 int num_args_checked = 0;
1452 if ((recognized_kind == MethodRecognizer::kMathMin) ||
1453 (recognized_kind == MethodRecognizer::kMathMax)) {
1454 num_args_checked = 2;
1455 }
1456 const ICData& ic_data = ICData::ZoneHandle(
1457 ICData::New(parsed_function().function(), // Caller function.
1458 String::Handle(target_function.name()),
1459 arguments_descriptor,
1460 deopt_id,
1461 num_args_checked)); // No arguments checked.
1462 ic_data.AddTarget(target_function);
1463 uword label_address = 0;
1464 if (ic_data.num_args_tested() == 0) {
1465 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint();
1466 } else if (ic_data.num_args_tested() == 2) {
1467 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint();
1468 } else {
1469 UNIMPLEMENTED();
1470 }
1471 ExternalLabel target_label("StaticCallICStub", label_address);
1472 __ LoadObject(S5, ic_data);
1473 GenerateDartCall(deopt_id,
1474 token_pos,
1475 &target_label,
1476 PcDescriptors::kUnoptStaticCall,
1477 locs);
1478 __ Drop(argument_count);
1479 }
1480
1481
1441 void FlowGraphCompiler::EmitOptimizedStaticCall( 1482 void FlowGraphCompiler::EmitOptimizedStaticCall(
1442 const Function& function, 1483 const Function& function,
1443 const Array& arguments_descriptor, 1484 const Array& arguments_descriptor,
1444 intptr_t argument_count, 1485 intptr_t argument_count,
1445 intptr_t deopt_id, 1486 intptr_t deopt_id,
1446 intptr_t token_pos, 1487 intptr_t token_pos,
1447 LocationSummary* locs) { 1488 LocationSummary* locs) {
1448 __ TraceSimMsg("StaticCall"); 1489 __ TraceSimMsg("StaticCall");
1449 __ LoadObject(S4, arguments_descriptor); 1490 __ LoadObject(S4, arguments_descriptor);
1450 // Do not use the code from the function, but let the code be patched so that 1491 // Do not use the code from the function, but let the code be patched so that
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 __ AddImmediate(SP, kDoubleSize); 2012 __ AddImmediate(SP, kDoubleSize);
1972 } 2013 }
1973 2014
1974 2015
1975 #undef __ 2016 #undef __
1976 2017
1977 2018
1978 } // namespace dart 2019 } // namespace dart
1979 2020
1980 #endif // defined TARGET_ARCH_MIPS 2021 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698