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

Side by Side Diff: src/ic.h

Issue 647013: Make setting length on arrays faster. (Closed)
Patch Set: Porting to ARM and x64 Created 10 years, 10 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
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | 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 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 27 matching lines...) Expand all
38 enum DictionaryCheck { CHECK_DICTIONARY, DICTIONARY_CHECK_DONE }; 38 enum DictionaryCheck { CHECK_DICTIONARY, DICTIONARY_CHECK_DONE };
39 39
40 40
41 // IC_UTIL_LIST defines all utility functions called from generated 41 // IC_UTIL_LIST defines all utility functions called from generated
42 // inline caching code. The argument for the macro, ICU, is the function name. 42 // inline caching code. The argument for the macro, ICU, is the function name.
43 #define IC_UTIL_LIST(ICU) \ 43 #define IC_UTIL_LIST(ICU) \
44 ICU(LoadIC_Miss) \ 44 ICU(LoadIC_Miss) \
45 ICU(KeyedLoadIC_Miss) \ 45 ICU(KeyedLoadIC_Miss) \
46 ICU(CallIC_Miss) \ 46 ICU(CallIC_Miss) \
47 ICU(StoreIC_Miss) \ 47 ICU(StoreIC_Miss) \
48 ICU(StoreIC_ArrayLength) \
48 ICU(SharedStoreIC_ExtendStorage) \ 49 ICU(SharedStoreIC_ExtendStorage) \
49 ICU(KeyedStoreIC_Miss) \ 50 ICU(KeyedStoreIC_Miss) \
50 /* Utilities for IC stubs. */ \ 51 /* Utilities for IC stubs. */ \
51 ICU(LoadCallbackProperty) \ 52 ICU(LoadCallbackProperty) \
52 ICU(StoreCallbackProperty) \ 53 ICU(StoreCallbackProperty) \
53 ICU(LoadPropertyWithInterceptorOnly) \ 54 ICU(LoadPropertyWithInterceptorOnly) \
54 ICU(LoadPropertyWithInterceptorForLoad) \ 55 ICU(LoadPropertyWithInterceptorForLoad) \
55 ICU(LoadPropertyWithInterceptorForCall) \ 56 ICU(LoadPropertyWithInterceptorForCall) \
56 ICU(KeyedLoadPropertyWithInterceptor) \ 57 ICU(KeyedLoadPropertyWithInterceptor) \
57 ICU(StoreInterceptorProperty) 58 ICU(StoreInterceptorProperty)
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 352
352 Object* Store(State state, 353 Object* Store(State state,
353 Handle<Object> object, 354 Handle<Object> object,
354 Handle<String> name, 355 Handle<String> name,
355 Handle<Object> value); 356 Handle<Object> value);
356 357
357 // Code generators for stub routines. Only called once at startup. 358 // Code generators for stub routines. Only called once at startup.
358 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 359 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
359 static void GenerateMiss(MacroAssembler* masm); 360 static void GenerateMiss(MacroAssembler* masm);
360 static void GenerateMegamorphic(MacroAssembler* masm); 361 static void GenerateMegamorphic(MacroAssembler* masm);
362 static void GenerateArrayLength(MacroAssembler* masm);
361 363
362 private: 364 private:
363 // Update the inline cache and the global stub cache based on the 365 // Update the inline cache and the global stub cache based on the
364 // lookup result. 366 // lookup result.
365 void UpdateCaches(LookupResult* lookup, 367 void UpdateCaches(LookupResult* lookup,
366 State state, Handle<JSObject> receiver, 368 State state, Handle<JSObject> receiver,
367 Handle<String> name, 369 Handle<String> name,
368 Handle<Object> value); 370 Handle<Object> value);
369 371
370 // Stub accessors. 372 // Stub accessors.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 // The map is the new map that the inlined code should check against. 440 // The map is the new map that the inlined code should check against.
439 static bool PatchInlinedStore(Address address, Object* map); 441 static bool PatchInlinedStore(Address address, Object* map);
440 442
441 friend class IC; 443 friend class IC;
442 }; 444 };
443 445
444 446
445 } } // namespace v8::internal 447 } } // namespace v8::internal
446 448
447 #endif // V8_IC_H_ 449 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698