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

Side by Side Diff: src/mips64/stub-cache-mips64.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/mips/stub-cache-mips.cc ('k') | src/stub-cache.h » ('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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 if (!miss->is_unused()) { 834 if (!miss->is_unused()) {
835 Label success; 835 Label success;
836 __ Branch(&success); 836 __ Branch(&success);
837 GenerateRestoreName(miss, name); 837 GenerateRestoreName(miss, name);
838 TailCallBuiltin(masm(), MissBuiltin(kind())); 838 TailCallBuiltin(masm(), MissBuiltin(kind()));
839 __ bind(&success); 839 __ bind(&success);
840 } 840 }
841 } 841 }
842 842
843 843
844 Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
845 Handle<Name> name,
846 Handle<Object> callback) {
847 Label miss;
848
849 Register reg = FrontendHeader(object_reg, name, &miss);
850
851 if (!holder()->HasFastProperties()) {
852 DCHECK(!holder()->IsGlobalObject());
853 DCHECK(!reg.is(scratch2()));
854 DCHECK(!reg.is(scratch3()));
855 DCHECK(!reg.is(scratch4()));
856
857 // Load the properties dictionary.
858 Register dictionary = scratch4();
859 __ ld(dictionary, FieldMemOperand(reg, JSObject::kPropertiesOffset));
860
861 // Probe the dictionary.
862 Label probe_done;
863 NameDictionaryLookupStub::GeneratePositiveLookup(masm(),
864 &miss,
865 &probe_done,
866 dictionary,
867 this->name(),
868 scratch2(),
869 scratch3());
870 __ bind(&probe_done);
871
872 // If probing finds an entry in the dictionary, scratch3 contains the
873 // pointer into the dictionary. Check that the value is the callback.
874 Register pointer = scratch3();
875 const int kElementsStartOffset = NameDictionary::kHeaderSize +
876 NameDictionary::kElementsStartIndex * kPointerSize;
877 const int kValueOffset = kElementsStartOffset + kPointerSize;
878 __ ld(scratch2(), FieldMemOperand(pointer, kValueOffset));
879 __ Branch(&miss, ne, scratch2(), Operand(callback));
880 }
881
882 FrontendFooter(name, &miss);
883 return reg;
884 }
885
886
887 void NamedLoadHandlerCompiler::GenerateLoadField( 844 void NamedLoadHandlerCompiler::GenerateLoadField(
888 Register reg, FieldIndex field, Representation representation) { 845 Register reg, FieldIndex field, Representation representation) {
889 if (!reg.is(receiver())) __ mov(receiver(), reg); 846 if (!reg.is(receiver())) __ mov(receiver(), reg);
890 LoadFieldStub stub(isolate(), field); 847 LoadFieldStub stub(isolate(), field);
891 GenerateTailCall(masm(), stub.GetCode()); 848 GenerateTailCall(masm(), stub.GetCode());
892 } 849 }
893 850
894 851
895 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) { 852 void NamedLoadHandlerCompiler::GenerateLoadConstant(Handle<Object> value) {
896 // Return the constant value. 853 // Return the constant value.
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 1289
1333 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1290 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1334 } 1291 }
1335 1292
1336 1293
1337 #undef __ 1294 #undef __
1338 1295
1339 } } // namespace v8::internal 1296 } } // namespace v8::internal
1340 1297
1341 #endif // V8_TARGET_ARCH_MIPS64 1298 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698