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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 64453002: Refactor loading a pointer into a register instruction for X64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased with bleeding_edge Created 7 years 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
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/test-macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 // If probing finds an entry in the dictionary, scratch3 contains the 1301 // If probing finds an entry in the dictionary, scratch3 contains the
1302 // index into the dictionary. Check that the value is the callback. 1302 // index into the dictionary. Check that the value is the callback.
1303 Register index = scratch3(); 1303 Register index = scratch3();
1304 const int kElementsStartOffset = 1304 const int kElementsStartOffset =
1305 NameDictionary::kHeaderSize + 1305 NameDictionary::kHeaderSize +
1306 NameDictionary::kElementsStartIndex * kPointerSize; 1306 NameDictionary::kElementsStartIndex * kPointerSize;
1307 const int kValueOffset = kElementsStartOffset + kPointerSize; 1307 const int kValueOffset = kElementsStartOffset + kPointerSize;
1308 __ movq(scratch2(), 1308 __ movq(scratch2(),
1309 Operand(dictionary, index, times_pointer_size, 1309 Operand(dictionary, index, times_pointer_size,
1310 kValueOffset - kHeapObjectTag)); 1310 kValueOffset - kHeapObjectTag));
1311 __ movq(scratch3(), callback, RelocInfo::EMBEDDED_OBJECT); 1311 __ Move(scratch3(), callback, RelocInfo::EMBEDDED_OBJECT);
1312 __ cmpq(scratch2(), scratch3()); 1312 __ cmpq(scratch2(), scratch3());
1313 __ j(not_equal, &miss); 1313 __ j(not_equal, &miss);
1314 } 1314 }
1315 1315
1316 HandlerFrontendFooter(name, &miss); 1316 HandlerFrontendFooter(name, &miss);
1317 return reg; 1317 return reg;
1318 } 1318 }
1319 1319
1320 1320
1321 void LoadStubCompiler::GenerateLoadField(Register reg, 1321 void LoadStubCompiler::GenerateLoadField(Register reg,
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
2661 __ movq(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset)); 2661 __ movq(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset));
2662 int receiver_count = receiver_maps->length(); 2662 int receiver_count = receiver_maps->length();
2663 for (int i = 0; i < receiver_count; ++i) { 2663 for (int i = 0; i < receiver_count; ++i) {
2664 // Check map and tail call if there's a match 2664 // Check map and tail call if there's a match
2665 __ Cmp(scratch1(), receiver_maps->at(i)); 2665 __ Cmp(scratch1(), receiver_maps->at(i));
2666 if (transitioned_maps->at(i).is_null()) { 2666 if (transitioned_maps->at(i).is_null()) {
2667 __ j(equal, handler_stubs->at(i), RelocInfo::CODE_TARGET); 2667 __ j(equal, handler_stubs->at(i), RelocInfo::CODE_TARGET);
2668 } else { 2668 } else {
2669 Label next_map; 2669 Label next_map;
2670 __ j(not_equal, &next_map, Label::kNear); 2670 __ j(not_equal, &next_map, Label::kNear);
2671 __ movq(transition_map(), 2671 __ Move(transition_map(),
2672 transitioned_maps->at(i), 2672 transitioned_maps->at(i),
2673 RelocInfo::EMBEDDED_OBJECT); 2673 RelocInfo::EMBEDDED_OBJECT);
2674 __ jmp(handler_stubs->at(i), RelocInfo::CODE_TARGET); 2674 __ jmp(handler_stubs->at(i), RelocInfo::CODE_TARGET);
2675 __ bind(&next_map); 2675 __ bind(&next_map);
2676 } 2676 }
2677 } 2677 }
2678 2678
2679 __ bind(&miss); 2679 __ bind(&miss);
2680 2680
2681 TailCallBuiltin(masm(), MissBuiltin(kind())); 2681 TailCallBuiltin(masm(), MissBuiltin(kind()));
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 // ----------------------------------- 2911 // -----------------------------------
2912 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2912 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2913 } 2913 }
2914 2914
2915 2915
2916 #undef __ 2916 #undef __
2917 2917
2918 } } // namespace v8::internal 2918 } } // namespace v8::internal
2919 2919
2920 #endif // V8_TARGET_ARCH_X64 2920 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/cctest/test-macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698