| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 static void GenerateMiss(MacroAssembler* masm); | 233 static void GenerateMiss(MacroAssembler* masm); |
| 234 static void GenerateMegamorphic(MacroAssembler* masm); | 234 static void GenerateMegamorphic(MacroAssembler* masm); |
| 235 static void GenerateNormal(MacroAssembler* masm); | 235 static void GenerateNormal(MacroAssembler* masm); |
| 236 | 236 |
| 237 // Specialized code generator routines. | 237 // Specialized code generator routines. |
| 238 static void GenerateArrayLength(MacroAssembler* masm); | 238 static void GenerateArrayLength(MacroAssembler* masm); |
| 239 static void GenerateStringLength(MacroAssembler* masm); | 239 static void GenerateStringLength(MacroAssembler* masm); |
| 240 static void GenerateFunctionPrototype(MacroAssembler* masm); | 240 static void GenerateFunctionPrototype(MacroAssembler* masm); |
| 241 | 241 |
| 242 // Clear the use of the inlined version. |
| 243 static void ClearInlinedVersion(Address address); |
| 244 |
| 242 // The offset from the inlined patch site to the start of the | 245 // The offset from the inlined patch site to the start of the |
| 243 // inlined load instruction. It is architecture-dependent, and not | 246 // inlined load instruction. It is architecture-dependent, and not |
| 244 // used on ARM. | 247 // used on ARM. |
| 245 static const int kOffsetToLoadInstruction; | 248 static const int kOffsetToLoadInstruction; |
| 246 | 249 |
| 247 private: | 250 private: |
| 248 // Update the inline cache and the global stub cache based on the | 251 // Update the inline cache and the global stub cache based on the |
| 249 // lookup result. | 252 // lookup result. |
| 250 void UpdateCaches(LookupResult* lookup, | 253 void UpdateCaches(LookupResult* lookup, |
| 251 State state, | 254 State state, |
| 252 Handle<Object> object, | 255 Handle<Object> object, |
| 253 Handle<String> name); | 256 Handle<String> name); |
| 254 | 257 |
| 255 // Stub accessors. | 258 // Stub accessors. |
| 256 static Code* megamorphic_stub() { | 259 static Code* megamorphic_stub() { |
| 257 return Builtins::builtin(Builtins::LoadIC_Megamorphic); | 260 return Builtins::builtin(Builtins::LoadIC_Megamorphic); |
| 258 } | 261 } |
| 259 static Code* initialize_stub() { | 262 static Code* initialize_stub() { |
| 260 return Builtins::builtin(Builtins::LoadIC_Initialize); | 263 return Builtins::builtin(Builtins::LoadIC_Initialize); |
| 261 } | 264 } |
| 262 static Code* pre_monomorphic_stub() { | 265 static Code* pre_monomorphic_stub() { |
| 263 return Builtins::builtin(Builtins::LoadIC_PreMonomorphic); | 266 return Builtins::builtin(Builtins::LoadIC_PreMonomorphic); |
| 264 } | 267 } |
| 265 | 268 |
| 266 static void Clear(Address address, Code* target); | 269 static void Clear(Address address, Code* target); |
| 267 | 270 |
| 268 // Clear the use of the inlined version. | |
| 269 static void ClearInlinedVersion(Address address); | |
| 270 | |
| 271 static bool PatchInlinedLoad(Address address, Object* map, int index); | 271 static bool PatchInlinedLoad(Address address, Object* map, int index); |
| 272 | 272 |
| 273 friend class IC; | 273 friend class IC; |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 | 276 |
| 277 class KeyedLoadIC: public IC { | 277 class KeyedLoadIC: public IC { |
| 278 public: | 278 public: |
| 279 KeyedLoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_keyed_load_stub()); } | 279 KeyedLoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_keyed_load_stub()); } |
| 280 | 280 |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 static const char* GetName(TypeInfo type_info); | 465 static const char* GetName(TypeInfo type_info); |
| 466 | 466 |
| 467 static State ToState(TypeInfo type_info); | 467 static State ToState(TypeInfo type_info); |
| 468 | 468 |
| 469 static TypeInfo GetTypeInfo(Object* left, Object* right); | 469 static TypeInfo GetTypeInfo(Object* left, Object* right); |
| 470 }; | 470 }; |
| 471 | 471 |
| 472 } } // namespace v8::internal | 472 } } // namespace v8::internal |
| 473 | 473 |
| 474 #endif // V8_IC_H_ | 474 #endif // V8_IC_H_ |
| OLD | NEW |