OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 175 matching lines...) Loading... |
186 IC::UtilityId id_; | 186 IC::UtilityId id_; |
187 }; | 187 }; |
188 | 188 |
189 | 189 |
190 class CallICBase: public IC { | 190 class CallICBase: public IC { |
191 protected: | 191 protected: |
192 explicit CallICBase(Code::Kind kind) : IC(EXTRA_CALL_FRAME), kind_(kind) {} | 192 explicit CallICBase(Code::Kind kind) : IC(EXTRA_CALL_FRAME), kind_(kind) {} |
193 | 193 |
194 public: | 194 public: |
195 MUST_USE_RESULT MaybeObject* LoadFunction(State state, | 195 MUST_USE_RESULT MaybeObject* LoadFunction(State state, |
| 196 Code::ExtraICState extra_ic_state, |
196 Handle<Object> object, | 197 Handle<Object> object, |
197 Handle<String> name); | 198 Handle<String> name); |
198 | 199 |
199 protected: | 200 protected: |
200 Code::Kind kind_; | 201 Code::Kind kind_; |
201 | 202 |
| 203 bool TryUpdateExtraICState(LookupResult* lookup, |
| 204 Handle<Object> object, |
| 205 Code::ExtraICState* extra_ic_state); |
| 206 |
202 // Update the inline cache and the global stub cache based on the | 207 // Update the inline cache and the global stub cache based on the |
203 // lookup result. | 208 // lookup result. |
204 void UpdateCaches(LookupResult* lookup, | 209 void UpdateCaches(LookupResult* lookup, |
205 State state, | 210 State state, |
| 211 Code::ExtraICState extra_ic_state, |
206 Handle<Object> object, | 212 Handle<Object> object, |
207 Handle<String> name); | 213 Handle<String> name); |
208 | 214 |
209 // Returns a JSFunction if the object can be called as a function, | 215 // Returns a JSFunction if the object can be called as a function, |
210 // and patches the stack to be ready for the call. | 216 // and patches the stack to be ready for the call. |
211 // Otherwise, it returns the undefined value. | 217 // Otherwise, it returns the undefined value. |
212 Object* TryCallAsFunction(Object* object); | 218 Object* TryCallAsFunction(Object* object); |
213 | 219 |
214 void ReceiverToObject(Handle<Object> object); | 220 void ReceiverToObject(Handle<Object> object); |
215 | 221 |
(...skipping 375 matching lines...) Loading... |
591 | 597 |
592 Token::Value op_; | 598 Token::Value op_; |
593 }; | 599 }; |
594 | 600 |
595 // Helper for TRBinaryOpIC and CompareIC. | 601 // Helper for TRBinaryOpIC and CompareIC. |
596 void PatchInlinedSmiCode(Address address); | 602 void PatchInlinedSmiCode(Address address); |
597 | 603 |
598 } } // namespace v8::internal | 604 } } // namespace v8::internal |
599 | 605 |
600 #endif // V8_IC_H_ | 606 #endif // V8_IC_H_ |
OLD | NEW |