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

Side by Side Diff: src/ic.h

Issue 219313002: Monomorphic prototype failures should be reserved for already-seen keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed nit. Created 6 years, 8 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 | « no previous file | src/ic.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // Construct the IC structure with the given number of extra 89 // Construct the IC structure with the given number of extra
90 // JavaScript frames on the stack. 90 // JavaScript frames on the stack.
91 IC(FrameDepth depth, Isolate* isolate); 91 IC(FrameDepth depth, Isolate* isolate);
92 virtual ~IC() {} 92 virtual ~IC() {}
93 93
94 State state() const { return state_; } 94 State state() const { return state_; }
95 inline Address address() const; 95 inline Address address() const;
96 96
97 // Compute the current IC state based on the target stub, receiver and name. 97 // Compute the current IC state based on the target stub, receiver and name.
98 void UpdateState(Handle<Object> receiver, Handle<Object> name); 98 void UpdateState(Handle<Object> receiver, Handle<Object> name);
99 void MarkMonomorphicPrototypeFailure() { 99
100 state_ = MONOMORPHIC_PROTOTYPE_FAILURE; 100 bool IsNameCompatibleWithMonomorphicPrototypeFailure(Handle<Object> name);
101 bool TryMarkMonomorphicPrototypeFailure(Handle<Object> name) {
102 if (IsNameCompatibleWithMonomorphicPrototypeFailure(name)) {
103 state_ = MONOMORPHIC_PROTOTYPE_FAILURE;
104 return true;
105 }
106 return false;
101 } 107 }
102 108
103 // Clear the inline cache to initial state. 109 // Clear the inline cache to initial state.
104 static void Clear(Isolate* isolate, 110 static void Clear(Isolate* isolate,
105 Address address, 111 Address address,
106 ConstantPoolArray* constant_pool); 112 ConstantPoolArray* constant_pool);
107 113
108 #ifdef DEBUG 114 #ifdef DEBUG
109 bool IsLoadStub() const { 115 bool IsLoadStub() const {
110 return target()->is_load_stub() || target()->is_keyed_load_stub(); 116 return target()->is_load_stub() || target()->is_keyed_load_stub();
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); 933 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss);
928 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); 934 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss);
929 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); 935 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite);
930 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); 936 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss);
931 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); 937 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss);
932 938
933 939
934 } } // namespace v8::internal 940 } } // namespace v8::internal
935 941
936 #endif // V8_IC_H_ 942 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « no previous file | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698