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

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

Issue 11312019: Remove references to ObjectNotClosureException and ClosureArgumentMismatchException (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/symbols.h » ('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) 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/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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 if (StackSize() != 0) { 808 if (StackSize() != 0) {
809 // We need to unwind the space we reserved for locals and copied parameters. 809 // We need to unwind the space we reserved for locals and copied parameters.
810 // The NoSuchMethodFunction stub does not expect to see that area on the 810 // The NoSuchMethodFunction stub does not expect to see that area on the
811 // stack. 811 // stack.
812 __ addq(RSP, Immediate(StackSize() * kWordSize)); 812 __ addq(RSP, Immediate(StackSize() * kWordSize));
813 } 813 }
814 // The calls immediately below have empty stackmaps because we have just 814 // The calls immediately below have empty stackmaps because we have just
815 // dropped the spill slots. 815 // dropped the spill slots.
816 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); 816 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder();
817 if (function.IsClosureFunction()) { 817 if (function.IsClosureFunction()) {
818 // TODO(regis): Call NoSuchMethod with "call" as name of original function.
818 // We do not use GenerateCallRuntime because of the non-standard (empty) 819 // We do not use GenerateCallRuntime because of the non-standard (empty)
819 // stackmap used here. 820 // stackmap used here.
820 __ CallRuntime(kClosureArgumentMismatchRuntimeEntry); 821 __ CallRuntime(kClosureArgumentMismatchRuntimeEntry);
821 AddCurrentDescriptor(PcDescriptors::kOther, 822 AddCurrentDescriptor(PcDescriptors::kOther,
822 Isolate::kNoDeoptId, 823 Isolate::kNoDeoptId,
823 0); // No token position. 824 0); // No token position.
824 } else { 825 } else {
825 // Invoke noSuchMethod function. 826 // Invoke noSuchMethod function.
826 const int kNumArgsChecked = 1; 827 const int kNumArgsChecked = 1;
827 ICData& ic_data = ICData::ZoneHandle(); 828 ICData& ic_data = ICData::ZoneHandle();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 #endif 957 #endif
957 if (check_arguments) { 958 if (check_arguments) {
958 __ Comment("Check argument count"); 959 __ Comment("Check argument count");
959 // Check that num_fixed <= argc <= num_params. 960 // Check that num_fixed <= argc <= num_params.
960 Label argc_in_range; 961 Label argc_in_range;
961 // Total number of args is the first Smi in args descriptor array (R10). 962 // Total number of args is the first Smi in args descriptor array (R10).
962 __ movq(RAX, FieldAddress(R10, Array::data_offset())); 963 __ movq(RAX, FieldAddress(R10, Array::data_offset()));
963 __ cmpq(RAX, Immediate(Smi::RawValue(num_fixed_params))); 964 __ cmpq(RAX, Immediate(Smi::RawValue(num_fixed_params)));
964 __ j(EQUAL, &argc_in_range, Assembler::kNearJump); 965 __ j(EQUAL, &argc_in_range, Assembler::kNearJump);
965 if (function.IsClosureFunction()) { 966 if (function.IsClosureFunction()) {
967 // TODO(regis): Call NoSuchMethod with "call" as name of original
968 // function.
966 GenerateCallRuntime(function.token_pos(), 969 GenerateCallRuntime(function.token_pos(),
967 kClosureArgumentMismatchRuntimeEntry, 970 kClosureArgumentMismatchRuntimeEntry,
968 prologue_locs); 971 prologue_locs);
969 } else { 972 } else {
970 __ Stop("Wrong number of arguments"); 973 __ Stop("Wrong number of arguments");
971 } 974 }
972 __ Bind(&argc_in_range); 975 __ Bind(&argc_in_range);
973 } 976 }
974 // The arguments descriptor is never saved in the absence of optional 977 // The arguments descriptor is never saved in the absence of optional
975 // parameters, since any argument definition test would always yield true. 978 // parameters, since any argument definition test would always yield true.
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1366 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1364 __ Exchange(mem1, mem2); 1367 __ Exchange(mem1, mem2);
1365 } 1368 }
1366 1369
1367 1370
1368 #undef __ 1371 #undef __
1369 1372
1370 } // namespace dart 1373 } // namespace dart
1371 1374
1372 #endif // defined TARGET_ARCH_X64 1375 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698