OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 // Code generator routines. | 408 // Code generator routines. |
409 static void GenerateMiss(MacroAssembler* masm); | 409 static void GenerateMiss(MacroAssembler* masm); |
410 static void GenerateRuntimeGetProperty(MacroAssembler* masm); | 410 static void GenerateRuntimeGetProperty(MacroAssembler* masm); |
411 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 411 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
412 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 412 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
413 GenerateMiss(masm); | 413 GenerateMiss(masm); |
414 } | 414 } |
415 static void GenerateGeneric(MacroAssembler* masm); | 415 static void GenerateGeneric(MacroAssembler* masm); |
416 static void GenerateString(MacroAssembler* masm); | 416 static void GenerateString(MacroAssembler* masm); |
417 static void GenerateIndexedInterceptor(MacroAssembler* masm); | 417 static void GenerateIndexedInterceptor(MacroAssembler* masm); |
418 static void GenerateNonStrictArguments(MacroAssembler* masm); | 418 static void GenerateSloppyArguments(MacroAssembler* masm); |
419 | 419 |
420 // Bit mask to be tested against bit field for the cases when | 420 // Bit mask to be tested against bit field for the cases when |
421 // generic stub should go into slow case. | 421 // generic stub should go into slow case. |
422 // Access check is necessary explicitly since generic stub does not perform | 422 // Access check is necessary explicitly since generic stub does not perform |
423 // map checks. | 423 // map checks. |
424 static const int kSlowCaseBitFieldMask = | 424 static const int kSlowCaseBitFieldMask = |
425 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor); | 425 (1 << Map::kIsAccessCheckNeeded) | (1 << Map::kHasIndexedInterceptor); |
426 | 426 |
427 protected: | 427 protected: |
428 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; } | 428 virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; } |
(...skipping 16 matching lines...) Expand all Loading... |
445 // Stub accessors. | 445 // Stub accessors. |
446 static Handle<Code> pre_monomorphic_stub(Isolate* isolate) { | 446 static Handle<Code> pre_monomorphic_stub(Isolate* isolate) { |
447 return isolate->builtins()->KeyedLoadIC_PreMonomorphic(); | 447 return isolate->builtins()->KeyedLoadIC_PreMonomorphic(); |
448 } | 448 } |
449 virtual Handle<Code> pre_monomorphic_stub() { | 449 virtual Handle<Code> pre_monomorphic_stub() { |
450 return pre_monomorphic_stub(isolate()); | 450 return pre_monomorphic_stub(isolate()); |
451 } | 451 } |
452 Handle<Code> indexed_interceptor_stub() { | 452 Handle<Code> indexed_interceptor_stub() { |
453 return isolate()->builtins()->KeyedLoadIC_IndexedInterceptor(); | 453 return isolate()->builtins()->KeyedLoadIC_IndexedInterceptor(); |
454 } | 454 } |
455 Handle<Code> non_strict_arguments_stub() { | 455 Handle<Code> sloppy_arguments_stub() { |
456 return isolate()->builtins()->KeyedLoadIC_NonStrictArguments(); | 456 return isolate()->builtins()->KeyedLoadIC_SloppyArguments(); |
457 } | 457 } |
458 Handle<Code> string_stub() { | 458 Handle<Code> string_stub() { |
459 return isolate()->builtins()->KeyedLoadIC_String(); | 459 return isolate()->builtins()->KeyedLoadIC_String(); |
460 } | 460 } |
461 | 461 |
462 static void Clear(Isolate* isolate, Address address, Code* target); | 462 static void Clear(Isolate* isolate, Address address, Code* target); |
463 | 463 |
464 friend class IC; | 464 friend class IC; |
465 }; | 465 }; |
466 | 466 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 // Code generators for stub routines. Only called once at startup. | 598 // Code generators for stub routines. Only called once at startup. |
599 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } | 599 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } |
600 static void GeneratePreMonomorphic(MacroAssembler* masm) { | 600 static void GeneratePreMonomorphic(MacroAssembler* masm) { |
601 GenerateMiss(masm); | 601 GenerateMiss(masm); |
602 } | 602 } |
603 static void GenerateMiss(MacroAssembler* masm); | 603 static void GenerateMiss(MacroAssembler* masm); |
604 static void GenerateSlow(MacroAssembler* masm); | 604 static void GenerateSlow(MacroAssembler* masm); |
605 static void GenerateRuntimeSetProperty(MacroAssembler* masm, | 605 static void GenerateRuntimeSetProperty(MacroAssembler* masm, |
606 StrictModeFlag strict_mode); | 606 StrictModeFlag strict_mode); |
607 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); | 607 static void GenerateGeneric(MacroAssembler* masm, StrictModeFlag strict_mode); |
608 static void GenerateNonStrictArguments(MacroAssembler* masm); | 608 static void GenerateSloppyArguments(MacroAssembler* masm); |
609 | 609 |
610 protected: | 610 protected: |
611 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } | 611 virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } |
612 | 612 |
613 virtual void UpdateMegamorphicCache(HeapType* type, Name* name, Code* code) {} | 613 virtual void UpdateMegamorphicCache(HeapType* type, Name* name, Code* code) {} |
614 | 614 |
615 virtual Handle<Code> pre_monomorphic_stub() { | 615 virtual Handle<Code> pre_monomorphic_stub() { |
616 return pre_monomorphic_stub(isolate(), strict_mode()); | 616 return pre_monomorphic_stub(isolate(), strict_mode()); |
617 } | 617 } |
618 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 618 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
(...skipping 27 matching lines...) Expand all Loading... |
646 | 646 |
647 // Stub accessors. | 647 // Stub accessors. |
648 virtual Handle<Code> generic_stub() const { | 648 virtual Handle<Code> generic_stub() const { |
649 if (strict_mode() == kStrictMode) { | 649 if (strict_mode() == kStrictMode) { |
650 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); | 650 return isolate()->builtins()->KeyedStoreIC_Generic_Strict(); |
651 } else { | 651 } else { |
652 return isolate()->builtins()->KeyedStoreIC_Generic(); | 652 return isolate()->builtins()->KeyedStoreIC_Generic(); |
653 } | 653 } |
654 } | 654 } |
655 | 655 |
656 Handle<Code> non_strict_arguments_stub() { | 656 Handle<Code> sloppy_arguments_stub() { |
657 return isolate()->builtins()->KeyedStoreIC_NonStrictArguments(); | 657 return isolate()->builtins()->KeyedStoreIC_SloppyArguments(); |
658 } | 658 } |
659 | 659 |
660 static void Clear(Isolate* isolate, Address address, Code* target); | 660 static void Clear(Isolate* isolate, Address address, Code* target); |
661 | 661 |
662 KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver, | 662 KeyedAccessStoreMode GetStoreMode(Handle<JSObject> receiver, |
663 Handle<Object> key, | 663 Handle<Object> key, |
664 Handle<Object> value); | 664 Handle<Object> value); |
665 | 665 |
666 Handle<Map> ComputeTransitionedMap(Handle<JSObject> receiver, | 666 Handle<Map> ComputeTransitionedMap(Handle<JSObject> receiver, |
667 KeyedAccessStoreMode store_mode); | 667 KeyedAccessStoreMode store_mode); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 906 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
907 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 907 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
908 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); | 908 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); |
909 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 909 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
910 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 910 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
911 | 911 |
912 | 912 |
913 } } // namespace v8::internal | 913 } } // namespace v8::internal |
914 | 914 |
915 #endif // V8_IC_H_ | 915 #endif // V8_IC_H_ |
OLD | NEW |