| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 class StoreIC: public IC { | 341 class StoreIC: public IC { |
| 342 public: | 342 public: |
| 343 StoreIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_store_stub()); } | 343 StoreIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_store_stub()); } |
| 344 | 344 |
| 345 Object* Store(State state, | 345 Object* Store(State state, |
| 346 Handle<Object> object, | 346 Handle<Object> object, |
| 347 Handle<String> name, | 347 Handle<String> name, |
| 348 Handle<Object> value); | 348 Handle<Object> value); |
| 349 | 349 |
| 350 // Code generators for stub routines. Only called once at startup. | 350 // Code generators for stub routines. Only called once at startup. |
| 351 static void GenerateInitialize(MacroAssembler* masm); | 351 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
| 352 static void GenerateMiss(MacroAssembler* masm); | 352 static void GenerateMiss(MacroAssembler* masm); |
| 353 static void GenerateMegamorphic(MacroAssembler* masm); | 353 static void GenerateMegamorphic(MacroAssembler* masm); |
| 354 static void GenerateExtendStorage(MacroAssembler* masm); | 354 static void GenerateExtendStorage(MacroAssembler* masm); |
| 355 | 355 |
| 356 private: | 356 private: |
| 357 static void Generate(MacroAssembler* masm, const ExternalReference& f); | |
| 358 | |
| 359 // Update the inline cache and the global stub cache based on the | 357 // Update the inline cache and the global stub cache based on the |
| 360 // lookup result. | 358 // lookup result. |
| 361 void UpdateCaches(LookupResult* lookup, | 359 void UpdateCaches(LookupResult* lookup, |
| 362 State state, Handle<JSObject> receiver, | 360 State state, Handle<JSObject> receiver, |
| 363 Handle<String> name, | 361 Handle<String> name, |
| 364 Handle<Object> value); | 362 Handle<Object> value); |
| 365 | 363 |
| 366 // Stub accessors. | 364 // Stub accessors. |
| 367 static Code* megamorphic_stub() { | 365 static Code* megamorphic_stub() { |
| 368 return Builtins::builtin(Builtins::StoreIC_Megamorphic); | 366 return Builtins::builtin(Builtins::StoreIC_Megamorphic); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 // The map is the new map that the inlined code should check against. | 434 // The map is the new map that the inlined code should check against. |
| 437 static bool PatchInlinedStore(Address address, Object* map); | 435 static bool PatchInlinedStore(Address address, Object* map); |
| 438 | 436 |
| 439 friend class IC; | 437 friend class IC; |
| 440 }; | 438 }; |
| 441 | 439 |
| 442 | 440 |
| 443 } } // namespace v8::internal | 441 } } // namespace v8::internal |
| 444 | 442 |
| 445 #endif // V8_IC_H_ | 443 #endif // V8_IC_H_ |
| OLD | NEW |