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

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

Issue 11442010: Introduce a class encapsulating arguments descriptor arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 8 years 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 branch->EmitBranchOnCondition(compiler, true_condition); 1900 branch->EmitBranchOnCondition(compiler, true_condition);
1901 } 1901 }
1902 1902
1903 1903
1904 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1904 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1905 // The arguments to the stub include the closure, as does the arguments 1905 // The arguments to the stub include the closure, as does the arguments
1906 // descriptor. 1906 // descriptor.
1907 Register temp_reg = locs()->temp(0).reg(); 1907 Register temp_reg = locs()->temp(0).reg();
1908 int argument_count = ArgumentCount(); 1908 int argument_count = ArgumentCount();
1909 const Array& arguments_descriptor = 1909 const Array& arguments_descriptor =
1910 DartEntry::ArgumentsDescriptor(argument_count, argument_names()); 1910 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
1911 argument_names()));
1911 __ LoadObject(temp_reg, arguments_descriptor); 1912 __ LoadObject(temp_reg, arguments_descriptor);
1912 compiler->GenerateDartCall(deopt_id(), 1913 compiler->GenerateDartCall(deopt_id(),
1913 token_pos(), 1914 token_pos(),
1914 &StubCode::CallClosureFunctionLabel(), 1915 &StubCode::CallClosureFunctionLabel(),
1915 PcDescriptors::kOther, 1916 PcDescriptors::kOther,
1916 locs()); 1917 locs());
1917 __ Drop(argument_count); 1918 __ Drop(argument_count);
1918 } 1919 }
1919 1920
1920 1921
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 default: 2753 default:
2753 UNREACHABLE(); 2754 UNREACHABLE();
2754 return -1; 2755 return -1;
2755 } 2756 }
2756 } 2757 }
2757 2758
2758 2759
2759 #undef __ 2760 #undef __
2760 2761
2761 } // namespace dart 2762 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698