OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2856 } | 2856 } |
2857 } | 2857 } |
2858 | 2858 |
2859 | 2859 |
2860 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { | 2860 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
2861 ASSERT(ToRegister(instr->object()).is(r1)); | 2861 ASSERT(ToRegister(instr->object()).is(r1)); |
2862 ASSERT(ToRegister(instr->value()).is(r0)); | 2862 ASSERT(ToRegister(instr->value()).is(r0)); |
2863 | 2863 |
2864 // Name is always in r2. | 2864 // Name is always in r2. |
2865 __ mov(r2, Operand(instr->name())); | 2865 __ mov(r2, Operand(instr->name())); |
2866 Handle<Code> ic(Builtins::builtin(info_->is_strict() | 2866 Handle<Code> ic(Builtins::builtin( |
2867 ? Builtins::StoreIC_Initialize_Strict | 2867 info_->is_strict() ? Builtins::StoreIC_Initialize_Strict |
2868 : Builtins::StoreIC_Initialize)); | 2868 : Builtins::StoreIC_Initialize)); |
2869 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2869 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2870 } | 2870 } |
2871 | 2871 |
2872 | 2872 |
2873 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { | 2873 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
2874 __ cmp(ToRegister(instr->index()), ToRegister(instr->length())); | 2874 __ cmp(ToRegister(instr->index()), ToRegister(instr->length())); |
2875 DeoptimizeIf(hs, instr->environment()); | 2875 DeoptimizeIf(hs, instr->environment()); |
2876 } | 2876 } |
2877 | 2877 |
2878 | 2878 |
(...skipping 21 matching lines...) Expand all Loading... |
2900 __ RecordWrite(elements, key, value); | 2900 __ RecordWrite(elements, key, value); |
2901 } | 2901 } |
2902 } | 2902 } |
2903 | 2903 |
2904 | 2904 |
2905 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { | 2905 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
2906 ASSERT(ToRegister(instr->object()).is(r2)); | 2906 ASSERT(ToRegister(instr->object()).is(r2)); |
2907 ASSERT(ToRegister(instr->key()).is(r1)); | 2907 ASSERT(ToRegister(instr->key()).is(r1)); |
2908 ASSERT(ToRegister(instr->value()).is(r0)); | 2908 ASSERT(ToRegister(instr->value()).is(r0)); |
2909 | 2909 |
2910 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); | 2910 Handle<Code> ic(Builtins::builtin( |
| 2911 info_->is_strict() ? Builtins::KeyedStoreIC_Initialize_Strict |
| 2912 : Builtins::KeyedStoreIC_Initialize)); |
2911 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2913 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2912 } | 2914 } |
2913 | 2915 |
2914 | 2916 |
2915 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 2917 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
2916 class DeferredStringCharCodeAt: public LDeferredCode { | 2918 class DeferredStringCharCodeAt: public LDeferredCode { |
2917 public: | 2919 public: |
2918 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) | 2920 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) |
2919 : LDeferredCode(codegen), instr_(instr) { } | 2921 : LDeferredCode(codegen), instr_(instr) { } |
2920 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } | 2922 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } |
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3848 ASSERT(!environment->HasBeenRegistered()); | 3850 ASSERT(!environment->HasBeenRegistered()); |
3849 RegisterEnvironmentForDeoptimization(environment); | 3851 RegisterEnvironmentForDeoptimization(environment); |
3850 ASSERT(osr_pc_offset_ == -1); | 3852 ASSERT(osr_pc_offset_ == -1); |
3851 osr_pc_offset_ = masm()->pc_offset(); | 3853 osr_pc_offset_ = masm()->pc_offset(); |
3852 } | 3854 } |
3853 | 3855 |
3854 | 3856 |
3855 #undef __ | 3857 #undef __ |
3856 | 3858 |
3857 } } // namespace v8::internal | 3859 } } // namespace v8::internal |
OLD | NEW |