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

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

Issue 2463083002: Remove default monomorphic check code from functions and stubs that do not need it. (Closed)
Patch Set: address comment Created 4 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 1013
1014 // Input parameters: 1014 // Input parameters:
1015 // LR: return address. 1015 // LR: return address.
1016 // SP: address of last argument. 1016 // SP: address of last argument.
1017 // FP: caller's frame pointer. 1017 // FP: caller's frame pointer.
1018 // PP: caller's pool pointer. 1018 // PP: caller's pool pointer.
1019 // R5: ic-data. 1019 // R5: ic-data.
1020 // R4: arguments descriptor array. 1020 // R4: arguments descriptor array.
1021 void FlowGraphCompiler::CompileGraph() { 1021 void FlowGraphCompiler::CompileGraph() {
1022 InitCompiler(); 1022 InitCompiler();
1023 const Function& function = parsed_function().function();
1024
1025 #ifdef DART_PRECOMPILER
1026 if (function.IsDynamicFunction()) {
1027 __ MonomorphicCheckedEntry();
1028 }
1029 #endif // DART_PRECOMPILER
1023 1030
1024 if (TryIntrinsify()) { 1031 if (TryIntrinsify()) {
1025 // Skip regular code generation. 1032 // Skip regular code generation.
1026 return; 1033 return;
1027 } 1034 }
1028 1035
1029 EmitFrameEntry(); 1036 EmitFrameEntry();
1030 ASSERT(assembler()->constant_pool_allowed()); 1037 ASSERT(assembler()->constant_pool_allowed());
1031 1038
1032 const Function& function = parsed_function().function();
1033
1034 const int num_fixed_params = function.num_fixed_parameters(); 1039 const int num_fixed_params = function.num_fixed_parameters();
1035 const int num_copied_params = parsed_function().num_copied_params(); 1040 const int num_copied_params = parsed_function().num_copied_params();
1036 const int num_locals = parsed_function().num_stack_locals(); 1041 const int num_locals = parsed_function().num_stack_locals();
1037 1042
1038 // We check the number of passed arguments when we have to copy them due to 1043 // We check the number of passed arguments when we have to copy them due to
1039 // the presence of optional parameters. 1044 // the presence of optional parameters.
1040 // No such checking code is generated if only fixed parameters are declared, 1045 // No such checking code is generated if only fixed parameters are declared,
1041 // unless we are in debug mode or unless we are compiling a closure. 1046 // unless we are in debug mode or unless we are compiling a closure.
1042 if (num_copied_params == 0) { 1047 if (num_copied_params == 0) {
1043 const bool check_arguments = 1048 const bool check_arguments =
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { 1912 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) {
1908 __ PopDouble(reg); 1913 __ PopDouble(reg);
1909 } 1914 }
1910 1915
1911 1916
1912 #undef __ 1917 #undef __
1913 1918
1914 } // namespace dart 1919 } // namespace dart
1915 1920
1916 #endif // defined TARGET_ARCH_ARM64 1921 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698