Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 6576024: (early draft) Strict mode - throw exception on assignment to read only property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 } 2860 }
2861 } 2861 }
2862 2862
2863 2863
2864 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 2864 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
2865 ASSERT(ToRegister(instr->object()).is(r1)); 2865 ASSERT(ToRegister(instr->object()).is(r1));
2866 ASSERT(ToRegister(instr->value()).is(r0)); 2866 ASSERT(ToRegister(instr->value()).is(r0));
2867 2867
2868 // Name is always in r2. 2868 // Name is always in r2.
2869 __ mov(r2, Operand(instr->name())); 2869 __ mov(r2, Operand(instr->name()));
2870 Handle<Code> ic(Builtins::builtin(info_->is_strict() 2870 Handle<Code> ic(Builtins::builtin(
2871 ? Builtins::StoreIC_Initialize_Strict 2871 info_->is_strict() ? Builtins::StoreIC_Initialize_Strict
2872 : Builtins::StoreIC_Initialize)); 2872 : Builtins::StoreIC_Initialize));
2873 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2873 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2874 } 2874 }
2875 2875
2876 2876
2877 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 2877 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
2878 __ cmp(ToRegister(instr->index()), ToRegister(instr->length())); 2878 __ cmp(ToRegister(instr->index()), ToRegister(instr->length()));
2879 DeoptimizeIf(hs, instr->environment()); 2879 DeoptimizeIf(hs, instr->environment());
2880 } 2880 }
2881 2881
2882 2882
(...skipping 21 matching lines...) Expand all
2904 __ RecordWrite(elements, key, value); 2904 __ RecordWrite(elements, key, value);
2905 } 2905 }
2906 } 2906 }
2907 2907
2908 2908
2909 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 2909 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
2910 ASSERT(ToRegister(instr->object()).is(r2)); 2910 ASSERT(ToRegister(instr->object()).is(r2));
2911 ASSERT(ToRegister(instr->key()).is(r1)); 2911 ASSERT(ToRegister(instr->key()).is(r1));
2912 ASSERT(ToRegister(instr->value()).is(r0)); 2912 ASSERT(ToRegister(instr->value()).is(r0));
2913 2913
2914 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); 2914 Handle<Code> ic(Builtins::builtin(
2915 info_->is_strict() ? Builtins::KeyedStoreIC_Initialize_Strict
2916 : Builtins::KeyedStoreIC_Initialize));
2915 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2917 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2916 } 2918 }
2917 2919
2918 2920
2919 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 2921 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
2920 class DeferredStringCharCodeAt: public LDeferredCode { 2922 class DeferredStringCharCodeAt: public LDeferredCode {
2921 public: 2923 public:
2922 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 2924 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
2923 : LDeferredCode(codegen), instr_(instr) { } 2925 : LDeferredCode(codegen), instr_(instr) { }
2924 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } 2926 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); }
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
3847 ASSERT(!environment->HasBeenRegistered()); 3849 ASSERT(!environment->HasBeenRegistered());
3848 RegisterEnvironmentForDeoptimization(environment); 3850 RegisterEnvironmentForDeoptimization(environment);
3849 ASSERT(osr_pc_offset_ == -1); 3851 ASSERT(osr_pc_offset_ == -1);
3850 osr_pc_offset_ = masm()->pc_offset(); 3852 osr_pc_offset_ = masm()->pc_offset();
3851 } 3853 }
3852 3854
3853 3855
3854 #undef __ 3856 #undef __
3855 3857
3856 } } // namespace v8::internal 3858 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698