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 | |
363 static Handle<Code> initialize_stub_in_optimized_code( | 356 static Handle<Code> initialize_stub_in_optimized_code( |
364 Isolate* isolate, State initialization_state, ExtraICState extra_state); | 357 Isolate* isolate, State initialization_state, ExtraICState extra_state); |
365 static Handle<Code> ChooseMegamorphicStub(Isolate* isolate, | 358 static Handle<Code> ChooseMegamorphicStub(Isolate* isolate, |
366 ExtraICState extra_state); | 359 ExtraICState extra_state); |
367 | 360 |
368 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus); | 361 static void Clear(Isolate* isolate, Code* host, KeyedLoadICNexus* nexus); |
369 | 362 |
370 protected: | 363 protected: |
371 // receiver is HeapObject because it could be a String or a JSObject | 364 // receiver is HeapObject because it could be a String or a JSObject |
372 void UpdateLoadElement(Handle<HeapObject> receiver); | 365 void UpdateLoadElement(Handle<HeapObject> receiver); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 | 534 |
542 // Helper for BinaryOpIC and CompareIC. | 535 // Helper for BinaryOpIC and CompareIC. |
543 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 536 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
544 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 537 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
545 InlinedSmiCheck check); | 538 InlinedSmiCheck check); |
546 | 539 |
547 } // namespace internal | 540 } // namespace internal |
548 } // namespace v8 | 541 } // namespace v8 |
549 | 542 |
550 #endif // V8_IC_H_ | 543 #endif // V8_IC_H_ |
OLD | NEW |