OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_IC_H_ | 5 #ifndef V8_IC_H_ |
6 #define V8_IC_H_ | 6 #define V8_IC_H_ |
7 | 7 |
8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 } | 346 } |
347 | 347 |
348 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 348 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
349 Handle<Object> key); | 349 Handle<Object> key); |
350 | 350 |
351 // Code generator routines. | 351 // Code generator routines. |
352 static void GenerateMiss(MacroAssembler* masm); | 352 static void GenerateMiss(MacroAssembler* masm); |
353 static void GenerateRuntimeGetProperty(MacroAssembler* masm); | 353 static void GenerateRuntimeGetProperty(MacroAssembler* masm); |
354 static void GenerateMegamorphic(MacroAssembler* masm); | 354 static void GenerateMegamorphic(MacroAssembler* masm); |
355 | 355 |
| 356 // Bit mask to be tested against bit field for the cases when |
| 357 // generic stub should go into slow case. |
| 358 // Access check is necessary explicitly since generic stub does not perform |
| 359 // map checks. |
| 360 static const int kSlowCaseBitFieldMask = |
| 361 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor); |
| 362 |
356 static Handle<Code> initialize_stub_in_optimized_code( | 363 static Handle<Code> initialize_stub_in_optimized_code( |
357 Isolate* isolate, State initialization_state, ExtraICState extra_state); | 364 Isolate* isolate, State initialization_state, ExtraICState extra_state); |
358 static Handle<Code> ChooseMegamorphicStub(Isolate* isolate, | 365 static Handle<Code> ChooseMegamorphicStub(Isolate* isolate, |
359 ExtraICState extra_state); | 366 ExtraICState extra_state); |
360 | 367 |
361 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus); | 368 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus); |
362 | 369 |
363 protected: | 370 protected: |
364 // receiver is HeapObject because it could be a String or a JSObject | 371 // receiver is HeapObject because it could be a String or a JSObject |
365 void UpdateLoadElement(Handle<HeapObject> receiver); | 372 void UpdateLoadElement(Handle<HeapObject> receiver); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 541 |
535 // Helper for BinaryOpIC and CompareIC. | 542 // Helper for BinaryOpIC and CompareIC. |
536 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 543 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
537 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 544 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
538 InlinedSmiCheck check); | 545 InlinedSmiCheck check); |
539 | 546 |
540 } // namespace internal | 547 } // namespace internal |
541 } // namespace v8 | 548 } // namespace v8 |
542 | 549 |
543 #endif // V8_IC_H_ | 550 #endif // V8_IC_H_ |
OLD | NEW |