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

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

Issue 19774007: Collect both arguments for math's min/max static functions. Later that information will be used to … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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_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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 GenerateDartCall(deopt_id, 1397 GenerateDartCall(deopt_id,
1398 token_pos, 1398 token_pos,
1399 &StubCode::CallStaticFunctionLabel(), 1399 &StubCode::CallStaticFunctionLabel(),
1400 PcDescriptors::kOptStaticCall, 1400 PcDescriptors::kOptStaticCall,
1401 locs); 1401 locs);
1402 AddStaticCallTarget(function); 1402 AddStaticCallTarget(function);
1403 __ Drop(argument_count); 1403 __ Drop(argument_count);
1404 } 1404 }
1405 1405
1406 1406
1407 void FlowGraphCompiler::EmitUnoptimizedStaticCall(
1408 const Function& target_function,
1409 const Array& arguments_descriptor,
1410 intptr_t argument_count,
1411 intptr_t deopt_id,
1412 intptr_t token_pos,
1413 LocationSummary* locs) {
1414 const ICData& ic_data = ICData::ZoneHandle(
1415 ICData::New(parsed_function().function(), // Caller function.
1416 String::Handle(target_function.name()),
1417 arguments_descriptor,
1418 deopt_id,
1419 0)); // No arguments checked.
1420 ic_data.AddTarget(target_function);
1421 __ LoadObject(RBX, ic_data);
1422 GenerateDartCall(deopt_id,
1423 token_pos,
1424 &StubCode::UnoptimizedStaticCallLabel(),
1425 PcDescriptors::kUnoptStaticCall,
1426 locs);
1427 __ Drop(argument_count);
1428 }
1429
1430
1431 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, 1407 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
1432 const Object& obj, 1408 const Object& obj,
1433 bool needs_number_check, 1409 bool needs_number_check,
1434 intptr_t token_pos) { 1410 intptr_t token_pos) {
1435 if (needs_number_check) { 1411 if (needs_number_check) {
1436 if (!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()) { 1412 if (!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()) {
1437 needs_number_check = false; 1413 needs_number_check = false;
1438 } 1414 }
1439 } 1415 }
1440 1416
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 __ movups(reg, Address(RSP, 0)); 1886 __ movups(reg, Address(RSP, 0));
1911 __ addq(RSP, Immediate(kFpuRegisterSize)); 1887 __ addq(RSP, Immediate(kFpuRegisterSize));
1912 } 1888 }
1913 1889
1914 1890
1915 #undef __ 1891 #undef __
1916 1892
1917 } // namespace dart 1893 } // namespace dart
1918 1894
1919 #endif // defined TARGET_ARCH_X64 1895 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698