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

Side by Side Diff: src/arm64/stub-cache-arm64.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/arm/stub-cache-arm.cc ('k') | src/ia32/stub-cache-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic-inl.h" 10 #include "src/ic-inl.h"
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 __ B(&success); 787 __ B(&success);
788 788
789 GenerateRestoreName(miss, name); 789 GenerateRestoreName(miss, name);
790 TailCallBuiltin(masm(), MissBuiltin(kind())); 790 TailCallBuiltin(masm(), MissBuiltin(kind()));
791 791
792 __ Bind(&success); 792 __ Bind(&success);
793 } 793 }
794 } 794 }
795 795
796 796
797 Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
798 Handle<Name> name,
799 Handle<Object> callback) {
800 Label miss;
801
802 Register reg = FrontendHeader(object_reg, name, &miss);
803 // FrontendHeader can return its result into scratch1() so do not
804 // use it.
805 Register scratch2 = this->scratch2();
806 Register scratch3 = this->scratch3();
807 Register dictionary = this->scratch4();
808 DCHECK(!AreAliased(reg, scratch2, scratch3, dictionary));
809
810 if (!holder()->HasFastProperties()) {
811 DCHECK(!holder()->IsGlobalObject());
812 // Load the properties dictionary.
813 __ Ldr(dictionary, FieldMemOperand(reg, JSObject::kPropertiesOffset));
814
815 // Probe the dictionary.
816 Label probe_done;
817 NameDictionaryLookupStub::GeneratePositiveLookup(masm(),
818 &miss,
819 &probe_done,
820 dictionary,
821 this->name(),
822 scratch2,
823 scratch3);
824 __ Bind(&probe_done);
825
826 // If probing finds an entry in the dictionary, scratch3 contains the
827 // pointer into the dictionary. Check that the value is the callback.
828 Register pointer = scratch3;
829 const int kElementsStartOffset = NameDictionary::kHeaderSize +
830 NameDictionary::kElementsStartIndex * kPointerSize;
831 const int kValueOffset = kElementsStartOffset + kPointerSize;
832 __ Ldr(scratch2, FieldMemOperand(pointer, kValueOffset));
833 __ Cmp(scratch2, Operand(callback));
834 __ B(ne, &miss);
835 }
836
837 FrontendFooter(name, &miss);
838 return reg;
839 }
840
841
842 void NamedLoadHandlerCompiler::GenerateLoadField( 797 void NamedLoadHandlerCompiler::GenerateLoadField(
843 Register reg, FieldIndex field, Representation representation) { 798 Register reg, FieldIndex field, Representation representation) {
844 __ Mov(receiver(), reg); 799 __ Mov(receiver(), reg);
845 LoadFieldStub stub(isolate(), field); 800 LoadFieldStub stub(isolate(), field);
846 GenerateTailCall(masm(), stub.GetCode()); 801 GenerateTailCall(masm(), stub.GetCode());
847 } 802 }
848 803
849 804
850 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) { 805 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) {
851 // Return the constant value. 806 // Return the constant value.
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 1253
1299 // Miss case, call the runtime. 1254 // Miss case, call the runtime.
1300 __ Bind(&miss); 1255 __ Bind(&miss);
1301 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1256 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1302 } 1257 }
1303 1258
1304 1259
1305 } } // namespace v8::internal 1260 } } // namespace v8::internal
1306 1261
1307 #endif // V8_TARGET_ARCH_ARM64 1262 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698