| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| 11 #include "vm/stub_code.h" | 11 #include "vm/stub_code.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 // TODO(hausner): Implement this. For now just return null instead |
| 16 // of hitting UNIMPLEMENTED. |
| 15 RawInstance* ActivationFrame::GetLocalVarValue(intptr_t slot_index) { | 17 RawInstance* ActivationFrame::GetLocalVarValue(intptr_t slot_index) { |
| 16 UNIMPLEMENTED(); | 18 return Instance::null(); |
| 17 return NULL; | |
| 18 } | 19 } |
| 19 | 20 |
| 20 | 21 |
| 21 RawInstance* ActivationFrame::GetInstanceCallReceiver( | 22 RawInstance* ActivationFrame::GetInstanceCallReceiver( |
| 22 intptr_t num_actual_args) { | 23 intptr_t num_actual_args) { |
| 23 ASSERT(num_actual_args > 0); // At minimum we have a receiver on the stack. | 24 ASSERT(num_actual_args > 0); // At minimum we have a receiver on the stack. |
| 24 // Stack pointer points to last argument that was pushed on the stack. | 25 // Stack pointer points to last argument that was pushed on the stack. |
| 25 uword receiver_addr = sp() + ((num_actual_args - 1) * kWordSize); | 26 uword receiver_addr = sp() + ((num_actual_args - 1) * kWordSize); |
| 26 return reinterpret_cast<RawInstance*>( | 27 return reinterpret_cast<RawInstance*>( |
| 27 *reinterpret_cast<uword*>(receiver_addr)); | 28 *reinterpret_cast<uword*>(receiver_addr)); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 code[9] = 0x90; // nop | 67 code[9] = 0x90; // nop |
| 67 code[10] = 0x90; // nop | 68 code[10] = 0x90; // nop |
| 68 code[11] = 0x90; // nop | 69 code[11] = 0x90; // nop |
| 69 code[12] = 0x90; // nop | 70 code[12] = 0x90; // nop |
| 70 CPU::FlushICache(pc_, 5); | 71 CPU::FlushICache(pc_, 5); |
| 71 } | 72 } |
| 72 | 73 |
| 73 } // namespace dart | 74 } // namespace dart |
| 74 | 75 |
| 75 #endif // defined TARGET_ARCH_X64 | 76 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |