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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 : IC(depth, isolate, nexus) { | 316 : IC(depth, isolate, nexus) { |
317 DCHECK(nexus != NULL); | 317 DCHECK(nexus != NULL); |
318 DCHECK(IsLoadStub()); | 318 DCHECK(IsLoadStub()); |
319 } | 319 } |
320 | 320 |
321 bool ShouldThrowReferenceError(Handle<Object> receiver) { | 321 bool ShouldThrowReferenceError(Handle<Object> receiver) { |
322 return receiver->IsGlobalObject() && typeof_mode() == NOT_INSIDE_TYPEOF; | 322 return receiver->IsGlobalObject() && typeof_mode() == NOT_INSIDE_TYPEOF; |
323 } | 323 } |
324 | 324 |
325 // Code generator routines. | 325 // Code generator routines. |
326 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 326 |
327 static void GenerateMiss(MacroAssembler* masm); | 327 // TODO(jkummerow): Remove the stress parameter and these stress constants |
| 328 // when a crash bug is fixed. |
| 329 static const int kStressNone = 0; |
| 330 static const int kStressInit = 1; |
| 331 static const int kStressDispatcher = 2; |
| 332 static const int kStressBuiltin = 3; |
| 333 static void GenerateInitialize(MacroAssembler* masm) { |
| 334 GenerateMiss(masm, kStressInit); |
| 335 } |
| 336 static void GenerateMiss(MacroAssembler* masm, int stress = kStressNone); |
328 static void GenerateRuntimeGetProperty(MacroAssembler* masm, | 337 static void GenerateRuntimeGetProperty(MacroAssembler* masm, |
329 LanguageMode language_mode); | 338 LanguageMode language_mode); |
330 static void GenerateNormal(MacroAssembler* masm, LanguageMode language_mode); | 339 static void GenerateNormal(MacroAssembler* masm, LanguageMode language_mode); |
331 | 340 |
332 static Handle<Code> initialize_stub(Isolate* isolate, | 341 static Handle<Code> initialize_stub(Isolate* isolate, |
333 ExtraICState extra_state); | 342 ExtraICState extra_state); |
334 static Handle<Code> initialize_stub_in_optimized_code( | 343 static Handle<Code> initialize_stub_in_optimized_code( |
335 Isolate* isolate, ExtraICState extra_state, State initialization_state); | 344 Isolate* isolate, ExtraICState extra_state, State initialization_state); |
336 | 345 |
337 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 346 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 | 690 |
682 | 691 |
683 // Helper for BinaryOpIC and CompareIC. | 692 // Helper for BinaryOpIC and CompareIC. |
684 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 693 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
685 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 694 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
686 | 695 |
687 } | 696 } |
688 } // namespace v8::internal | 697 } // namespace v8::internal |
689 | 698 |
690 #endif // V8_IC_H_ | 699 #endif // V8_IC_H_ |
OLD | NEW |