OLD | NEW |
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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 // stack. | 790 // stack. |
791 __ addq(RSP, Immediate(StackSize() * kWordSize)); | 791 __ addq(RSP, Immediate(StackSize() * kWordSize)); |
792 } | 792 } |
793 // The call below has an empty stackmap because we have just | 793 // The call below has an empty stackmap because we have just |
794 // dropped the spill slots. | 794 // dropped the spill slots. |
795 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); | 795 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); |
796 | 796 |
797 // Invoke noSuchMethod function passing the original name of the function. | 797 // Invoke noSuchMethod function passing the original name of the function. |
798 // If the function is a closure function, use "call" as the original name. | 798 // If the function is a closure function, use "call" as the original name. |
799 const String& name = String::Handle( | 799 const String& name = String::Handle( |
800 function.IsClosureFunction() ? Symbols::Call() : function.name()); | 800 function.IsClosureFunction() ? Symbols::Call().raw() : function.name()); |
801 const int kNumArgsChecked = 1; | 801 const int kNumArgsChecked = 1; |
802 const ICData& ic_data = ICData::ZoneHandle( | 802 const ICData& ic_data = ICData::ZoneHandle( |
803 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked)); | 803 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked)); |
804 __ LoadObject(RBX, ic_data); | 804 __ LoadObject(RBX, ic_data); |
805 // RBP - 8 : PC marker, allows easy identification of RawInstruction obj. | 805 // RBP - 8 : PC marker, allows easy identification of RawInstruction obj. |
806 // RBP : points to previous frame pointer. | 806 // RBP : points to previous frame pointer. |
807 // RBP + 8 : points to return address. | 807 // RBP + 8 : points to return address. |
808 // RBP + 16 : address of last argument (arg n-1). | 808 // RBP + 16 : address of last argument (arg n-1). |
809 // RSP + 16 + 8*(n-1) : address of first argument (arg 0). | 809 // RSP + 16 + 8*(n-1) : address of first argument (arg 0). |
810 // RBX : ic-data. | 810 // RBX : ic-data. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 // We need to unwind the space we reserved for locals and copied | 925 // We need to unwind the space we reserved for locals and copied |
926 // parameters. The NoSuchMethodFunction stub does not expect to see | 926 // parameters. The NoSuchMethodFunction stub does not expect to see |
927 // that area on the stack. | 927 // that area on the stack. |
928 __ addq(RSP, Immediate(StackSize() * kWordSize)); | 928 __ addq(RSP, Immediate(StackSize() * kWordSize)); |
929 } | 929 } |
930 // The call below has an empty stackmap because we have just | 930 // The call below has an empty stackmap because we have just |
931 // dropped the spill slots. | 931 // dropped the spill slots. |
932 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); | 932 BitmapBuilder* empty_stack_bitmap = new BitmapBuilder(); |
933 | 933 |
934 // Invoke noSuchMethod function passing "call" as the function name. | 934 // Invoke noSuchMethod function passing "call" as the function name. |
935 const String& name = String::Handle(Symbols::Call()); | |
936 const int kNumArgsChecked = 1; | 935 const int kNumArgsChecked = 1; |
937 const ICData& ic_data = ICData::ZoneHandle( | 936 const ICData& ic_data = ICData::ZoneHandle( |
938 ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked)); | 937 ICData::New(function, Symbols::Call(), |
| 938 Isolate::kNoDeoptId, kNumArgsChecked)); |
939 __ LoadObject(RBX, ic_data); | 939 __ LoadObject(RBX, ic_data); |
940 // RBP - 8 : PC marker, for easy identification of RawInstruction obj. | 940 // RBP - 8 : PC marker, for easy identification of RawInstruction obj. |
941 // RBP : points to previous frame pointer. | 941 // RBP : points to previous frame pointer. |
942 // RBP + 8 : points to return address. | 942 // RBP + 8 : points to return address. |
943 // RBP + 16 : address of last argument (arg n-1). | 943 // RBP + 16 : address of last argument (arg n-1). |
944 // RSP + 16 + 8*(n-1) : address of first argument (arg 0). | 944 // RSP + 16 + 8*(n-1) : address of first argument (arg 0). |
945 // RBX : ic-data. | 945 // RBX : ic-data. |
946 // R10 : arguments descriptor array. | 946 // R10 : arguments descriptor array. |
947 __ call(&StubCode::CallNoSuchMethodFunctionLabel()); | 947 __ call(&StubCode::CallNoSuchMethodFunctionLabel()); |
948 if (is_optimizing()) { | 948 if (is_optimizing()) { |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1477 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1477 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
1478 __ Exchange(mem1, mem2); | 1478 __ Exchange(mem1, mem2); |
1479 } | 1479 } |
1480 | 1480 |
1481 | 1481 |
1482 #undef __ | 1482 #undef __ |
1483 | 1483 |
1484 } // namespace dart | 1484 } // namespace dart |
1485 | 1485 |
1486 #endif // defined TARGET_ARCH_X64 | 1486 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |