blob: 7b8b1bf01a3a3ddcbc4fbcabc9753481145d1130 [file] [log] [blame]
Steve Blocka7e24c12009-10-30 11:49:00 +00001// Copyright 2006-2009 the V8 project authors. All rights reserved.
2// Redistribution and use in source and binary forms, with or without
3// modification, are permitted provided that the following conditions are
4// met:
5//
6// * Redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer.
8// * Redistributions in binary form must reproduce the above
9// copyright notice, this list of conditions and the following
10// disclaimer in the documentation and/or other materials provided
11// with the distribution.
12// * Neither the name of Google Inc. nor the names of its
13// contributors may be used to endorse or promote products derived
14// from this software without specific prior written permission.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28#ifndef V8_IC_H_
29#define V8_IC_H_
30
31#include "assembler.h"
32
33namespace v8 {
34namespace internal {
35
Leon Clarkee46be812010-01-19 14:06:41 +000036
Steve Blocka7e24c12009-10-30 11:49:00 +000037// IC_UTIL_LIST defines all utility functions called from generated
38// inline caching code. The argument for the macro, ICU, is the function name.
39#define IC_UTIL_LIST(ICU) \
40 ICU(LoadIC_Miss) \
41 ICU(KeyedLoadIC_Miss) \
42 ICU(CallIC_Miss) \
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +010043 ICU(KeyedCallIC_Miss) \
Steve Blocka7e24c12009-10-30 11:49:00 +000044 ICU(StoreIC_Miss) \
Steve Block6ded16b2010-05-10 14:33:55 +010045 ICU(StoreIC_ArrayLength) \
Steve Blocka7e24c12009-10-30 11:49:00 +000046 ICU(SharedStoreIC_ExtendStorage) \
47 ICU(KeyedStoreIC_Miss) \
48 /* Utilities for IC stubs. */ \
49 ICU(LoadCallbackProperty) \
50 ICU(StoreCallbackProperty) \
51 ICU(LoadPropertyWithInterceptorOnly) \
52 ICU(LoadPropertyWithInterceptorForLoad) \
53 ICU(LoadPropertyWithInterceptorForCall) \
Andrei Popescu402d9372010-02-26 13:31:12 +000054 ICU(KeyedLoadPropertyWithInterceptor) \
Steve Block6ded16b2010-05-10 14:33:55 +010055 ICU(StoreInterceptorProperty) \
56 ICU(BinaryOp_Patch)
Steve Blocka7e24c12009-10-30 11:49:00 +000057
58//
59// IC is the base class for LoadIC, StoreIC, CallIC, KeyedLoadIC,
60// and KeyedStoreIC.
61//
62class IC {
63 public:
64
65 // The ids for utility called from the generated code.
66 enum UtilityId {
67 #define CONST_NAME(name) k##name,
68 IC_UTIL_LIST(CONST_NAME)
69 #undef CONST_NAME
70 kUtilityCount
71 };
72
73 // Looks up the address of the named utility.
74 static Address AddressFromUtilityId(UtilityId id);
75
76 // Alias the inline cache state type to make the IC code more readable.
77 typedef InlineCacheState State;
78
79 // The IC code is either invoked with no extra frames on the stack
80 // or with a single extra frame for supporting calls.
81 enum FrameDepth {
82 NO_EXTRA_FRAME = 0,
83 EXTRA_CALL_FRAME = 1
84 };
85
86 // Construct the IC structure with the given number of extra
87 // JavaScript frames on the stack.
88 explicit IC(FrameDepth depth);
89
90 // Get the call-site target; used for determining the state.
91 Code* target() { return GetTargetAtAddress(address()); }
92 inline Address address();
93
Steve Block6ded16b2010-05-10 14:33:55 +010094 // Compute the current IC state based on the target stub, receiver and name.
95 static State StateFrom(Code* target, Object* receiver, Object* name);
Steve Blocka7e24c12009-10-30 11:49:00 +000096
97 // Clear the inline cache to initial state.
98 static void Clear(Address address);
99
100 // Computes the reloc info for this IC. This is a fairly expensive
101 // operation as it has to search through the heap to find the code
102 // object that contains this IC site.
103 RelocInfo::Mode ComputeMode();
104
105 // Returns if this IC is for contextual (no explicit receiver)
106 // access to properties.
Leon Clarkee46be812010-01-19 14:06:41 +0000107 bool IsContextual(Handle<Object> receiver) {
108 if (receiver->IsGlobalObject()) {
109 return SlowIsContextual();
110 } else {
111 ASSERT(!SlowIsContextual());
112 return false;
113 }
114 }
115
116 bool SlowIsContextual() {
Steve Blocka7e24c12009-10-30 11:49:00 +0000117 return ComputeMode() == RelocInfo::CODE_TARGET_CONTEXT;
118 }
119
Steve Block8defd9f2010-07-08 12:39:36 +0100120 // Determines which map must be used for keeping the code stub.
121 // These methods should not be called with undefined or null.
122 static inline InlineCacheHolderFlag GetCodeCacheForObject(Object* object,
123 JSObject* holder);
124 static inline InlineCacheHolderFlag GetCodeCacheForObject(JSObject* object,
125 JSObject* holder);
Kristian Monsen80d68ea2010-09-08 11:05:35 +0100126 static inline JSObject* GetCodeCacheHolder(Object* object,
127 InlineCacheHolderFlag holder);
Steve Blocka7e24c12009-10-30 11:49:00 +0000128
129 protected:
130 Address fp() const { return fp_; }
131 Address pc() const { return *pc_address_; }
132
133#ifdef ENABLE_DEBUGGER_SUPPORT
134 // Computes the address in the original code when the code running is
135 // containing break points (calls to DebugBreakXXX builtins).
136 Address OriginalCodeAddress();
137#endif
138
139 // Set the call-site target.
140 void set_target(Code* code) { SetTargetAtAddress(address(), code); }
141
142#ifdef DEBUG
143 static void TraceIC(const char* type,
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100144 Handle<Object> name,
Steve Blocka7e24c12009-10-30 11:49:00 +0000145 State old_state,
146 Code* new_target,
147 const char* extra_info = "");
148#endif
149
150 static Failure* TypeError(const char* type,
151 Handle<Object> object,
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100152 Handle<Object> key);
Steve Blocka7e24c12009-10-30 11:49:00 +0000153 static Failure* ReferenceError(const char* type, Handle<String> name);
154
155 // Access the target code for the given IC address.
156 static inline Code* GetTargetAtAddress(Address address);
157 static inline void SetTargetAtAddress(Address address, Code* target);
158
159 private:
160 // Frame pointer for the frame that uses (calls) the IC.
161 Address fp_;
162
163 // All access to the program counter of an IC structure is indirect
164 // to make the code GC safe. This feature is crucial since
165 // GetProperty and SetProperty are called and they in turn might
166 // invoke the garbage collector.
167 Address* pc_address_;
168
169 DISALLOW_IMPLICIT_CONSTRUCTORS(IC);
170};
171
172
173// An IC_Utility encapsulates IC::UtilityId. It exists mainly because you
174// cannot make forward declarations to an enum.
175class IC_Utility {
176 public:
177 explicit IC_Utility(IC::UtilityId id)
178 : address_(IC::AddressFromUtilityId(id)), id_(id) {}
179
180 Address address() const { return address_; }
181
182 IC::UtilityId id() const { return id_; }
183 private:
184 Address address_;
185 IC::UtilityId id_;
186};
187
188
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100189class CallICBase: public IC {
190 protected:
191 explicit CallICBase(Code::Kind kind) : IC(EXTRA_CALL_FRAME), kind_(kind) {}
Steve Blocka7e24c12009-10-30 11:49:00 +0000192
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100193 public:
John Reck59135872010-11-02 12:39:01 -0700194 MUST_USE_RESULT MaybeObject* LoadFunction(State state,
195 Handle<Object> object,
196 Handle<String> name);
Steve Blocka7e24c12009-10-30 11:49:00 +0000197
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100198 protected:
199 Code::Kind kind_;
Steve Blocka7e24c12009-10-30 11:49:00 +0000200
Steve Blocka7e24c12009-10-30 11:49:00 +0000201 // Update the inline cache and the global stub cache based on the
202 // lookup result.
203 void UpdateCaches(LookupResult* lookup,
204 State state,
205 Handle<Object> object,
206 Handle<String> name);
207
208 // Returns a JSFunction if the object can be called as a function,
209 // and patches the stack to be ready for the call.
210 // Otherwise, it returns the undefined value.
211 Object* TryCallAsFunction(Object* object);
212
Leon Clarkee46be812010-01-19 14:06:41 +0000213 void ReceiverToObject(Handle<Object> object);
214
Steve Blocka7e24c12009-10-30 11:49:00 +0000215 static void Clear(Address address, Code* target);
216 friend class IC;
217};
218
219
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100220class CallIC: public CallICBase {
221 public:
222 CallIC() : CallICBase(Code::CALL_IC) { ASSERT(target()->is_call_stub()); }
223
224 // Code generator routines.
225 static void GenerateInitialize(MacroAssembler* masm, int argc) {
226 GenerateMiss(masm, argc);
227 }
228 static void GenerateMiss(MacroAssembler* masm, int argc);
229 static void GenerateMegamorphic(MacroAssembler* masm, int argc);
230 static void GenerateNormal(MacroAssembler* masm, int argc);
231};
232
233
234class KeyedCallIC: public CallICBase {
235 public:
236 KeyedCallIC() : CallICBase(Code::KEYED_CALL_IC) {
237 ASSERT(target()->is_keyed_call_stub());
238 }
239
John Reck59135872010-11-02 12:39:01 -0700240 MUST_USE_RESULT MaybeObject* LoadFunction(State state,
241 Handle<Object> object,
242 Handle<Object> key);
Ben Murdoch7f4d5bd2010-06-15 11:15:29 +0100243
244 // Code generator routines.
245 static void GenerateInitialize(MacroAssembler* masm, int argc) {
246 GenerateMiss(masm, argc);
247 }
248 static void GenerateMiss(MacroAssembler* masm, int argc);
249 static void GenerateMegamorphic(MacroAssembler* masm, int argc);
250 static void GenerateNormal(MacroAssembler* masm, int argc);
251};
252
253
Steve Blocka7e24c12009-10-30 11:49:00 +0000254class LoadIC: public IC {
255 public:
256 LoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_load_stub()); }
257
John Reck59135872010-11-02 12:39:01 -0700258 MUST_USE_RESULT MaybeObject* Load(State state,
259 Handle<Object> object,
260 Handle<String> name);
Steve Blocka7e24c12009-10-30 11:49:00 +0000261
262 // Code generator routines.
Andrei Popescu402d9372010-02-26 13:31:12 +0000263 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
264 static void GeneratePreMonomorphic(MacroAssembler* masm) {
265 GenerateMiss(masm);
266 }
Steve Blocka7e24c12009-10-30 11:49:00 +0000267 static void GenerateMiss(MacroAssembler* masm);
268 static void GenerateMegamorphic(MacroAssembler* masm);
269 static void GenerateNormal(MacroAssembler* masm);
270
271 // Specialized code generator routines.
272 static void GenerateArrayLength(MacroAssembler* masm);
273 static void GenerateStringLength(MacroAssembler* masm);
274 static void GenerateFunctionPrototype(MacroAssembler* masm);
275
Kristian Monsen25f61362010-05-21 11:50:48 +0100276 // Clear the use of the inlined version.
277 static void ClearInlinedVersion(Address address);
278
Steve Blocka7e24c12009-10-30 11:49:00 +0000279 // The offset from the inlined patch site to the start of the
280 // inlined load instruction. It is architecture-dependent, and not
281 // used on ARM.
282 static const int kOffsetToLoadInstruction;
283
284 private:
Steve Blocka7e24c12009-10-30 11:49:00 +0000285 // Update the inline cache and the global stub cache based on the
286 // lookup result.
287 void UpdateCaches(LookupResult* lookup,
288 State state,
289 Handle<Object> object,
290 Handle<String> name);
291
292 // Stub accessors.
293 static Code* megamorphic_stub() {
294 return Builtins::builtin(Builtins::LoadIC_Megamorphic);
295 }
296 static Code* initialize_stub() {
297 return Builtins::builtin(Builtins::LoadIC_Initialize);
298 }
299 static Code* pre_monomorphic_stub() {
300 return Builtins::builtin(Builtins::LoadIC_PreMonomorphic);
301 }
302
303 static void Clear(Address address, Code* target);
304
Steve Blocka7e24c12009-10-30 11:49:00 +0000305 static bool PatchInlinedLoad(Address address, Object* map, int index);
306
Kristian Monsen0d5e1162010-09-30 15:31:59 +0100307 static bool PatchInlinedContextualLoad(Address address,
308 Object* map,
Ben Murdochf87a2032010-10-22 12:50:53 +0100309 Object* cell,
310 bool is_dont_delete);
Kristian Monsen0d5e1162010-09-30 15:31:59 +0100311
Steve Blocka7e24c12009-10-30 11:49:00 +0000312 friend class IC;
313};
314
315
316class KeyedLoadIC: public IC {
317 public:
318 KeyedLoadIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_keyed_load_stub()); }
319
John Reck59135872010-11-02 12:39:01 -0700320 MUST_USE_RESULT MaybeObject* Load(State state,
321 Handle<Object> object,
322 Handle<Object> key);
Steve Blocka7e24c12009-10-30 11:49:00 +0000323
324 // Code generator routines.
325 static void GenerateMiss(MacroAssembler* masm);
Andrei Popescu402d9372010-02-26 13:31:12 +0000326 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
327 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
328 static void GeneratePreMonomorphic(MacroAssembler* masm) {
329 GenerateMiss(masm);
330 }
Steve Blocka7e24c12009-10-30 11:49:00 +0000331 static void GenerateGeneric(MacroAssembler* masm);
Leon Clarkee46be812010-01-19 14:06:41 +0000332 static void GenerateString(MacroAssembler* masm);
Steve Blocka7e24c12009-10-30 11:49:00 +0000333
Steve Block3ce2e202009-11-05 08:53:23 +0000334 // Generators for external array types. See objects.h.
335 // These are similar to the generic IC; they optimize the case of
336 // operating upon external array types but fall back to the runtime
337 // for all other types.
338 static void GenerateExternalArray(MacroAssembler* masm,
339 ExternalArrayType array_type);
Andrei Popescu402d9372010-02-26 13:31:12 +0000340 static void GenerateIndexedInterceptor(MacroAssembler* masm);
Steve Block3ce2e202009-11-05 08:53:23 +0000341
Steve Blocka7e24c12009-10-30 11:49:00 +0000342 // Clear the use of the inlined version.
343 static void ClearInlinedVersion(Address address);
344
Leon Clarked91b9f72010-01-27 17:25:45 +0000345 // Bit mask to be tested against bit field for the cases when
346 // generic stub should go into slow case.
347 // Access check is necessary explicitly since generic stub does not perform
348 // map checks.
349 static const int kSlowCaseBitFieldMask =
350 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor);
351
Steve Block6ded16b2010-05-10 14:33:55 +0100352 private:
Steve Blocka7e24c12009-10-30 11:49:00 +0000353 // Update the inline cache.
354 void UpdateCaches(LookupResult* lookup,
355 State state,
356 Handle<Object> object,
357 Handle<String> name);
358
359 // Stub accessors.
360 static Code* initialize_stub() {
361 return Builtins::builtin(Builtins::KeyedLoadIC_Initialize);
362 }
363 static Code* megamorphic_stub() {
364 return Builtins::builtin(Builtins::KeyedLoadIC_Generic);
365 }
366 static Code* generic_stub() {
367 return Builtins::builtin(Builtins::KeyedLoadIC_Generic);
368 }
369 static Code* pre_monomorphic_stub() {
370 return Builtins::builtin(Builtins::KeyedLoadIC_PreMonomorphic);
371 }
Leon Clarkee46be812010-01-19 14:06:41 +0000372 static Code* string_stub() {
373 return Builtins::builtin(Builtins::KeyedLoadIC_String);
374 }
Steve Block3ce2e202009-11-05 08:53:23 +0000375 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
Steve Blocka7e24c12009-10-30 11:49:00 +0000376
Andrei Popescu402d9372010-02-26 13:31:12 +0000377 static Code* indexed_interceptor_stub() {
378 return Builtins::builtin(Builtins::KeyedLoadIC_IndexedInterceptor);
379 }
380
Steve Blocka7e24c12009-10-30 11:49:00 +0000381 static void Clear(Address address, Code* target);
382
383 // Support for patching the map that is checked in an inlined
384 // version of keyed load.
385 static bool PatchInlinedLoad(Address address, Object* map);
386
387 friend class IC;
388};
389
390
391class StoreIC: public IC {
392 public:
393 StoreIC() : IC(NO_EXTRA_FRAME) { ASSERT(target()->is_store_stub()); }
394
John Reck59135872010-11-02 12:39:01 -0700395 MUST_USE_RESULT MaybeObject* Store(State state,
396 Handle<Object> object,
397 Handle<String> name,
398 Handle<Object> value);
Steve Blocka7e24c12009-10-30 11:49:00 +0000399
400 // Code generators for stub routines. Only called once at startup.
Leon Clarke4515c472010-02-03 11:58:03 +0000401 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
Steve Blocka7e24c12009-10-30 11:49:00 +0000402 static void GenerateMiss(MacroAssembler* masm);
403 static void GenerateMegamorphic(MacroAssembler* masm);
Steve Block6ded16b2010-05-10 14:33:55 +0100404 static void GenerateArrayLength(MacroAssembler* masm);
Steve Block8defd9f2010-07-08 12:39:36 +0100405 static void GenerateNormal(MacroAssembler* masm);
Steve Blocka7e24c12009-10-30 11:49:00 +0000406
Kristian Monsen50ef84f2010-07-29 15:18:00 +0100407 // Clear the use of an inlined version.
408 static void ClearInlinedVersion(Address address);
409
410 // The offset from the inlined patch site to the start of the
411 // inlined store instruction.
412 static const int kOffsetToStoreInstruction;
413
Steve Blocka7e24c12009-10-30 11:49:00 +0000414 private:
Steve Blocka7e24c12009-10-30 11:49:00 +0000415 // Update the inline cache and the global stub cache based on the
416 // lookup result.
417 void UpdateCaches(LookupResult* lookup,
418 State state, Handle<JSObject> receiver,
419 Handle<String> name,
420 Handle<Object> value);
421
422 // Stub accessors.
423 static Code* megamorphic_stub() {
424 return Builtins::builtin(Builtins::StoreIC_Megamorphic);
425 }
426 static Code* initialize_stub() {
427 return Builtins::builtin(Builtins::StoreIC_Initialize);
428 }
429
430 static void Clear(Address address, Code* target);
Kristian Monsen50ef84f2010-07-29 15:18:00 +0100431
432 // Support for patching the index and the map that is checked in an
433 // inlined version of the named store.
434 static bool PatchInlinedStore(Address address, Object* map, int index);
435
Steve Blocka7e24c12009-10-30 11:49:00 +0000436 friend class IC;
437};
438
439
440class KeyedStoreIC: public IC {
441 public:
442 KeyedStoreIC() : IC(NO_EXTRA_FRAME) { }
443
John Reck59135872010-11-02 12:39:01 -0700444 MUST_USE_RESULT MaybeObject* Store(State state,
445 Handle<Object> object,
446 Handle<Object> name,
447 Handle<Object> value);
Steve Blocka7e24c12009-10-30 11:49:00 +0000448
449 // Code generators for stub routines. Only called once at startup.
Andrei Popescu402d9372010-02-26 13:31:12 +0000450 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
Steve Blocka7e24c12009-10-30 11:49:00 +0000451 static void GenerateMiss(MacroAssembler* masm);
Andrei Popescu402d9372010-02-26 13:31:12 +0000452 static void GenerateRuntimeSetProperty(MacroAssembler* masm);
Steve Blocka7e24c12009-10-30 11:49:00 +0000453 static void GenerateGeneric(MacroAssembler* masm);
Steve Blocka7e24c12009-10-30 11:49:00 +0000454
Steve Block3ce2e202009-11-05 08:53:23 +0000455 // Generators for external array types. See objects.h.
456 // These are similar to the generic IC; they optimize the case of
457 // operating upon external array types but fall back to the runtime
458 // for all other types.
459 static void GenerateExternalArray(MacroAssembler* masm,
460 ExternalArrayType array_type);
461
Steve Blocka7e24c12009-10-30 11:49:00 +0000462 // Clear the inlined version so the IC is always hit.
463 static void ClearInlinedVersion(Address address);
464
465 // Restore the inlined version so the fast case can get hit.
466 static void RestoreInlinedVersion(Address address);
467
468 private:
Steve Blocka7e24c12009-10-30 11:49:00 +0000469 // Update the inline cache.
470 void UpdateCaches(LookupResult* lookup,
471 State state,
472 Handle<JSObject> receiver,
473 Handle<String> name,
474 Handle<Object> value);
475
476 // Stub accessors.
477 static Code* initialize_stub() {
478 return Builtins::builtin(Builtins::KeyedStoreIC_Initialize);
479 }
480 static Code* megamorphic_stub() {
481 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
482 }
483 static Code* generic_stub() {
484 return Builtins::builtin(Builtins::KeyedStoreIC_Generic);
485 }
Steve Block3ce2e202009-11-05 08:53:23 +0000486 static Code* external_array_stub(JSObject::ElementsKind elements_kind);
Steve Blocka7e24c12009-10-30 11:49:00 +0000487
488 static void Clear(Address address, Code* target);
489
490 // Support for patching the map that is checked in an inlined
491 // version of keyed store.
492 // The address is the patch point for the IC call
493 // (Assembler::kCallTargetAddressOffset before the end of
494 // the call/return address).
495 // The map is the new map that the inlined code should check against.
496 static bool PatchInlinedStore(Address address, Object* map);
497
498 friend class IC;
499};
500
501
Steve Block6ded16b2010-05-10 14:33:55 +0100502class BinaryOpIC: public IC {
503 public:
504
505 enum TypeInfo {
506 DEFAULT, // Initial state. When first executed, patches to one
507 // of the following states depending on the operands types.
508 HEAP_NUMBERS, // Both arguments are HeapNumbers.
509 STRINGS, // At least one of the arguments is String.
510 GENERIC // Non-specialized case (processes any type combination).
511 };
512
513 BinaryOpIC() : IC(NO_EXTRA_FRAME) { }
514
515 void patch(Code* code);
516
517 static void Clear(Address address, Code* target);
518
519 static const char* GetName(TypeInfo type_info);
520
521 static State ToState(TypeInfo type_info);
522
523 static TypeInfo GetTypeInfo(Object* left, Object* right);
524};
525
Steve Blocka7e24c12009-10-30 11:49:00 +0000526} } // namespace v8::internal
527
528#endif // V8_IC_H_