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

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

Powered by Google App Engine
This is Rietveld 408576698