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