Chromium Code Reviews| 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 |
|
Jakob Kummerow
2015/09/16 13:57:22
nit: s/remove/Remove/, and the next two lines fit
mvstanton
2015/09/16 14:55:41
Done.
| |
| 328 // when | |
| 329 // a crash bug is fixed. | |
| 330 static const int kStressNone = 0; | |
| 331 static const int kStressInit = 1; | |
| 332 static const int kStressDispatcher = 2; | |
| 333 static const int kStressBuiltin = 3; | |
| 334 static void GenerateInitialize(MacroAssembler* masm) { | |
| 335 GenerateMiss(masm, kStressInit); | |
| 336 } | |
| 337 static void GenerateMiss(MacroAssembler* masm, int stress = kStressNone); | |
| 328 static void GenerateRuntimeGetProperty(MacroAssembler* masm, | 338 static void GenerateRuntimeGetProperty(MacroAssembler* masm, |
| 329 LanguageMode language_mode); | 339 LanguageMode language_mode); |
| 330 static void GenerateNormal(MacroAssembler* masm, LanguageMode language_mode); | 340 static void GenerateNormal(MacroAssembler* masm, LanguageMode language_mode); |
| 331 | 341 |
| 332 static Handle<Code> initialize_stub(Isolate* isolate, | 342 static Handle<Code> initialize_stub(Isolate* isolate, |
| 333 ExtraICState extra_state); | 343 ExtraICState extra_state); |
| 334 static Handle<Code> initialize_stub_in_optimized_code( | 344 static Handle<Code> initialize_stub_in_optimized_code( |
| 335 Isolate* isolate, ExtraICState extra_state, State initialization_state); | 345 Isolate* isolate, ExtraICState extra_state, State initialization_state); |
| 336 | 346 |
| 337 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 347 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 681 | 691 |
| 682 | 692 |
| 683 // Helper for BinaryOpIC and CompareIC. | 693 // Helper for BinaryOpIC and CompareIC. |
| 684 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 694 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
| 685 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 695 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
| 686 | 696 |
| 687 } | 697 } |
| 688 } // namespace v8::internal | 698 } // namespace v8::internal |
| 689 | 699 |
| 690 #endif // V8_IC_H_ | 700 #endif // V8_IC_H_ |
| OLD | NEW |