| 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/assembler_macros.h" | 9 #include "vm/assembler_macros.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); | 281 __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
| 282 __ movq(RAX, Address(RAX, Isolate::object_store_offset())); | 282 __ movq(RAX, Address(RAX, Isolate::object_store_offset())); |
| 283 __ movq(RAX, Address(RAX, ObjectStore::object_class_offset())); | 283 __ movq(RAX, Address(RAX, ObjectStore::object_class_offset())); |
| 284 | 284 |
| 285 __ Bind(&class_in_rax); | 285 __ Bind(&class_in_rax); |
| 286 // Class is in RAX. | 286 // Class is in RAX. |
| 287 | 287 |
| 288 Label loop, next_iteration; | 288 Label loop, next_iteration; |
| 289 // Get functions_cache, since it is allocated lazily it maybe null. | 289 // Get functions_cache, since it is allocated lazily it maybe null. |
| 290 __ movq(RAX, FieldAddress(RAX, Class::functions_cache_offset())); | 290 __ movq(RAX, FieldAddress(RAX, Class::functions_cache_offset())); |
| 291 __ cmpq(RAX, raw_null); |
| 292 __ j(EQUAL, ¬_found, Assembler::kNearJump); |
| 293 |
| 291 // Iterate and search for identical name. | 294 // Iterate and search for identical name. |
| 292 __ leaq(R12, FieldAddress(RAX, Array::data_offset())); | 295 __ leaq(R12, FieldAddress(RAX, Array::data_offset())); |
| 293 | 296 |
| 294 // R12 is pointing into content of functions_map_ array. | 297 // R12 is pointing into content of functions_map_ array. |
| 295 __ Bind(&loop); | 298 __ Bind(&loop); |
| 296 __ movq(R13, Address(R12, FunctionsCache::kFunctionName * kWordSize)); | 299 __ movq(R13, Address(R12, FunctionsCache::kFunctionName * kWordSize)); |
| 297 | 300 |
| 298 __ cmpq(R13, raw_null); | 301 __ cmpq(R13, raw_null); |
| 299 __ j(EQUAL, ¬_found, Assembler::kNearJump); | 302 __ j(EQUAL, ¬_found, Assembler::kNearJump); |
| 300 | 303 |
| (...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { | 1936 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { |
| 1934 __ movq(RAX, RCX); // error object. | 1937 __ movq(RAX, RCX); // error object. |
| 1935 __ movq(RBP, RDX); // target frame_pointer. | 1938 __ movq(RBP, RDX); // target frame_pointer. |
| 1936 __ movq(RSP, RSI); // target stack_pointer. | 1939 __ movq(RSP, RSI); // target stack_pointer. |
| 1937 __ jmp(RDI); // Jump to the exception handler code. | 1940 __ jmp(RDI); // Jump to the exception handler code. |
| 1938 } | 1941 } |
| 1939 | 1942 |
| 1940 } // namespace dart | 1943 } // namespace dart |
| 1941 | 1944 |
| 1942 #endif // defined TARGET_ARCH_X64 | 1945 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |