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

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

Issue 6814012: Strict mode fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/ast.h » ('j') | src/ast.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 // Store the value. 2210 // Store the value.
2211 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); 2211 __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
2212 } 2212 }
2213 2213
2214 2214
2215 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { 2215 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
2216 ASSERT(ToRegister(instr->global_object()).is(r1)); 2216 ASSERT(ToRegister(instr->global_object()).is(r1));
2217 ASSERT(ToRegister(instr->value()).is(r0)); 2217 ASSERT(ToRegister(instr->value()).is(r0));
2218 2218
2219 __ mov(r2, Operand(instr->name())); 2219 __ mov(r2, Operand(instr->name()));
2220 Handle<Code> ic = isolate()->builtins()->StoreIC_Initialize(); 2220 Handle<Code> ic = instr->strict_mode()
Martin Maly 2011/04/07 10:07:07 First fix. When optimizing strict mode functions w
2221 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2222 : isolate()->builtins()->StoreIC_Initialize();
2221 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); 2223 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr);
2222 } 2224 }
2223 2225
2224 2226
2225 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2227 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2226 Register context = ToRegister(instr->context()); 2228 Register context = ToRegister(instr->context());
2227 Register result = ToRegister(instr->result()); 2229 Register result = ToRegister(instr->result());
2228 __ ldr(result, ContextOperand(context, instr->slot_index())); 2230 __ ldr(result, ContextOperand(context, instr->slot_index()));
2229 } 2231 }
2230 2232
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
3064 } 3066 }
3065 } 3067 }
3066 3068
3067 3069
3068 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 3070 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
3069 ASSERT(ToRegister(instr->object()).is(r1)); 3071 ASSERT(ToRegister(instr->object()).is(r1));
3070 ASSERT(ToRegister(instr->value()).is(r0)); 3072 ASSERT(ToRegister(instr->value()).is(r0));
3071 3073
3072 // Name is always in r2. 3074 // Name is always in r2.
3073 __ mov(r2, Operand(instr->name())); 3075 __ mov(r2, Operand(instr->name()));
3074 Handle<Code> ic = info_->is_strict_mode() 3076 Handle<Code> ic = instr->strict_mode()
Martin Maly 2011/04/07 10:07:07 Second fix - the info_ does contain strict mode fl
3075 ? isolate()->builtins()->StoreIC_Initialize_Strict() 3077 ? isolate()->builtins()->StoreIC_Initialize_Strict()
3076 : isolate()->builtins()->StoreIC_Initialize(); 3078 : isolate()->builtins()->StoreIC_Initialize();
3077 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3079 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3078 } 3080 }
3079 3081
3080 3082
3081 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 3083 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
3082 __ cmp(ToRegister(instr->index()), ToRegister(instr->length())); 3084 __ cmp(ToRegister(instr->index()), ToRegister(instr->length()));
3083 DeoptimizeIf(hs, instr->environment()); 3085 DeoptimizeIf(hs, instr->environment());
3084 } 3086 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
3122 __ Usat(value, 8, Operand(value)); 3124 __ Usat(value, 8, Operand(value));
3123 __ strb(value, MemOperand(external_pointer, key, LSL, 0)); 3125 __ strb(value, MemOperand(external_pointer, key, LSL, 0));
3124 } 3126 }
3125 3127
3126 3128
3127 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 3129 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
3128 ASSERT(ToRegister(instr->object()).is(r2)); 3130 ASSERT(ToRegister(instr->object()).is(r2));
3129 ASSERT(ToRegister(instr->key()).is(r1)); 3131 ASSERT(ToRegister(instr->key()).is(r1));
3130 ASSERT(ToRegister(instr->value()).is(r0)); 3132 ASSERT(ToRegister(instr->value()).is(r0));
3131 3133
3132 Handle<Code> ic = info_->is_strict_mode() 3134 Handle<Code> ic = instr->strict_mode()
3133 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() 3135 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
3134 : isolate()->builtins()->KeyedStoreIC_Initialize(); 3136 : isolate()->builtins()->KeyedStoreIC_Initialize();
3135 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3137 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3136 } 3138 }
3137 3139
3138 3140
3139 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 3141 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
3140 class DeferredStringCharCodeAt: public LDeferredCode { 3142 class DeferredStringCharCodeAt: public LDeferredCode {
3141 public: 3143 public:
3142 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 3144 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
4123 ASSERT(!environment->HasBeenRegistered()); 4125 ASSERT(!environment->HasBeenRegistered());
4124 RegisterEnvironmentForDeoptimization(environment); 4126 RegisterEnvironmentForDeoptimization(environment);
4125 ASSERT(osr_pc_offset_ == -1); 4127 ASSERT(osr_pc_offset_ == -1);
4126 osr_pc_offset_ = masm()->pc_offset(); 4128 osr_pc_offset_ = masm()->pc_offset();
4127 } 4129 }
4128 4130
4129 4131
4130 #undef __ 4132 #undef __
4131 4133
4132 } } // namespace v8::internal 4134 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/ast.h » ('j') | src/ast.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698