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

Side by Side Diff: vm/stub_code_x64.cc

Issue 10827249: - Register canonical names for internal VM classes and get rid of the method GetSingletonClassName (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 months 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
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" 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
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, &not_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, &not_found, Assembler::kNearJump); 302 __ j(EQUAL, &not_found, Assembler::kNearJump);
300 303
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { 1935 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) {
1933 __ movq(RAX, RCX); // error object. 1936 __ movq(RAX, RCX); // error object.
1934 __ movq(RBP, RDX); // target frame_pointer. 1937 __ movq(RBP, RDX); // target frame_pointer.
1935 __ movq(RSP, RSI); // target stack_pointer. 1938 __ movq(RSP, RSI); // target stack_pointer.
1936 __ jmp(RDI); // Jump to the exception handler code. 1939 __ jmp(RDI); // Jump to the exception handler code.
1937 } 1940 }
1938 1941
1939 } // namespace dart 1942 } // namespace dart
1940 1943
1941 #endif // defined TARGET_ARCH_X64 1944 #endif // defined TARGET_ARCH_X64
OLDNEW
« vm/object.h ('K') | « vm/stub_code_ia32.cc ('k') | vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698