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

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

Issue 436273002: Remove special frontend for callbacks with slow-mode holders. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
« no previous file with comments | « src/stub-cache.cc ('k') | src/x87/stub-cache-x87.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 if (!miss->is_unused()) { 741 if (!miss->is_unused()) {
742 Label success; 742 Label success;
743 __ jmp(&success); 743 __ jmp(&success);
744 GenerateRestoreName(miss, name); 744 GenerateRestoreName(miss, name);
745 TailCallBuiltin(masm(), MissBuiltin(kind())); 745 TailCallBuiltin(masm(), MissBuiltin(kind()));
746 __ bind(&success); 746 __ bind(&success);
747 } 747 }
748 } 748 }
749 749
750 750
751 Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
752 Handle<Name> name,
753 Handle<Object> callback) {
754 Label miss;
755
756 Register reg = FrontendHeader(object_reg, name, &miss);
757
758 if (!holder()->HasFastProperties()) {
759 DCHECK(!holder()->IsGlobalObject());
760 DCHECK(!reg.is(scratch2()));
761 DCHECK(!reg.is(scratch3()));
762 DCHECK(!reg.is(scratch4()));
763
764 // Load the properties dictionary.
765 Register dictionary = scratch4();
766 __ movp(dictionary, FieldOperand(reg, JSObject::kPropertiesOffset));
767
768 // Probe the dictionary.
769 Label probe_done;
770 NameDictionaryLookupStub::GeneratePositiveLookup(masm(),
771 &miss,
772 &probe_done,
773 dictionary,
774 this->name(),
775 scratch2(),
776 scratch3());
777 __ bind(&probe_done);
778
779 // If probing finds an entry in the dictionary, scratch3 contains the
780 // index into the dictionary. Check that the value is the callback.
781 Register index = scratch3();
782 const int kElementsStartOffset =
783 NameDictionary::kHeaderSize +
784 NameDictionary::kElementsStartIndex * kPointerSize;
785 const int kValueOffset = kElementsStartOffset + kPointerSize;
786 __ movp(scratch2(),
787 Operand(dictionary, index, times_pointer_size,
788 kValueOffset - kHeapObjectTag));
789 __ Move(scratch3(), callback, RelocInfo::EMBEDDED_OBJECT);
790 __ cmpp(scratch2(), scratch3());
791 __ j(not_equal, &miss);
792 }
793
794 FrontendFooter(name, &miss);
795 return reg;
796 }
797
798
799 void NamedLoadHandlerCompiler::GenerateLoadField( 751 void NamedLoadHandlerCompiler::GenerateLoadField(
800 Register reg, FieldIndex field, Representation representation) { 752 Register reg, FieldIndex field, Representation representation) {
801 if (!reg.is(receiver())) __ movp(receiver(), reg); 753 if (!reg.is(receiver())) __ movp(receiver(), reg);
802 LoadFieldStub stub(isolate(), field); 754 LoadFieldStub stub(isolate(), field);
803 GenerateTailCall(masm(), stub.GetCode()); 755 GenerateTailCall(masm(), stub.GetCode());
804 } 756 }
805 757
806 758
807 void NamedLoadHandlerCompiler::GenerateLoadCallback( 759 void NamedLoadHandlerCompiler::GenerateLoadCallback(
808 Register reg, Handle<ExecutableAccessorInfo> callback) { 760 Register reg, Handle<ExecutableAccessorInfo> callback) {
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 // ----------------------------------- 1219 // -----------------------------------
1268 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1220 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1269 } 1221 }
1270 1222
1271 1223
1272 #undef __ 1224 #undef __
1273 1225
1274 } } // namespace v8::internal 1226 } } // namespace v8::internal
1275 1227
1276 #endif // V8_TARGET_ARCH_X64 1228 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | src/x87/stub-cache-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698