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

Side by Side Diff: src/ic.h

Issue 553117: Implementing inline caches for binary operations (ia32).... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | « src/ia32/codegen-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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ICU(StoreIC_ArrayLength) \ 48 ICU(StoreIC_ArrayLength) \
49 ICU(SharedStoreIC_ExtendStorage) \ 49 ICU(SharedStoreIC_ExtendStorage) \
50 ICU(KeyedStoreIC_Miss) \ 50 ICU(KeyedStoreIC_Miss) \
51 /* Utilities for IC stubs. */ \ 51 /* Utilities for IC stubs. */ \
52 ICU(LoadCallbackProperty) \ 52 ICU(LoadCallbackProperty) \
53 ICU(StoreCallbackProperty) \ 53 ICU(StoreCallbackProperty) \
54 ICU(LoadPropertyWithInterceptorOnly) \ 54 ICU(LoadPropertyWithInterceptorOnly) \
55 ICU(LoadPropertyWithInterceptorForLoad) \ 55 ICU(LoadPropertyWithInterceptorForLoad) \
56 ICU(LoadPropertyWithInterceptorForCall) \ 56 ICU(LoadPropertyWithInterceptorForCall) \
57 ICU(KeyedLoadPropertyWithInterceptor) \ 57 ICU(KeyedLoadPropertyWithInterceptor) \
58 ICU(StoreInterceptorProperty) 58 ICU(StoreInterceptorProperty) \
59 ICU(BinaryOp_Patch)
59 60
60 // 61 //
61 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC, 62 // IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC,
62 // and KeyedStoreIC. 63 // and KeyedStoreIC.
63 // 64 //
64 class IC { 65 class IC {
65 public: 66 public:
66 67
67 // The ids for utility called from the generated code. 68 // The ids for utility called from the generated code.
68 enum UtilityId { 69 enum UtilityId {
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // The address is the patch point for the IC call 438 // The address is the patch point for the IC call
438 // (Assembler::kCallTargetAddressOffset before the end of 439 // (Assembler::kCallTargetAddressOffset before the end of
439 // the call/return address). 440 // the call/return address).
440 // The map is the new map that the inlined code should check against. 441 // The map is the new map that the inlined code should check against.
441 static bool PatchInlinedStore(Address address, Object* map); 442 static bool PatchInlinedStore(Address address, Object* map);
442 443
443 friend class IC; 444 friend class IC;
444 }; 445 };
445 446
446 447
448 class BinaryOpIC: public IC {
449 public:
450
451 enum TypeInfo {
452 DEFAULT, // Initial state. When first executed, patches to one
453 // of the following states depending on the operands types.
454 HEAP_NUMBERS, // Both arguments are HeapNumbers.
455 STRINGS, // At least one of the arguments is String.
456 GENERIC // Non-specialized case (processes any type combination).
457 };
458
459 BinaryOpIC() : IC(NO_EXTRA_FRAME) { }
460
461 void patch(Code* code);
462
463 static void Clear(Address address, Code* target);
464
465 static const char* GetName(TypeInfo type_info);
466
467 static State ToState(TypeInfo type_info);
468
469 static TypeInfo GetTypeInfo(Object* left, Object* right);
470 };
471
447 } } // namespace v8::internal 472 } } // namespace v8::internal
448 473
449 #endif // V8_IC_H_ 474 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698