Chromium Code Reviews| Index: src/x64/ic-x64.cc |
| diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc |
| index 55d837c6b6363deee884d550b2342a3e0e5738f5..c6d2afab18aadfd78e112e70ef1867416dbafc54 100644 |
| --- a/src/x64/ic-x64.cc |
| +++ b/src/x64/ic-x64.cc |
| @@ -766,7 +766,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { |
| } |
| -void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
| +void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
| + StrictModeFlag strict_mode) { |
| // ----------- S t a t e ------------- |
| // -- rax : value |
| // -- rcx : key |
| @@ -813,7 +814,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
| __ bind(&slow); |
| __ Integer32ToSmi(rcx, rcx); |
| __ bind(&slow_with_tagged_index); |
| - GenerateRuntimeSetProperty(masm); |
| + GenerateRuntimeSetProperty(masm, strict_mode); |
| // Never returns to here. |
| // Check whether the elements is a pixel array. |
| @@ -1474,7 +1475,7 @@ void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
| void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| - Code::ExtraICState extra_ic_state) { |
| + StrictModeFlag strict_mode) { |
| // ----------- S t a t e ------------- |
| // -- rax : value |
| // -- rcx : name |
| @@ -1486,7 +1487,7 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, |
| NOT_IN_LOOP, |
| MONOMORPHIC, |
| - extra_ic_state); |
| + strict_mode); |
| StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg); |
| // Cache miss: Jump to runtime. |
| @@ -1593,7 +1594,7 @@ void StoreIC::GenerateNormal(MacroAssembler* masm) { |
| } |
| -void StoreIC::GenerateGlobalProxy(MacroAssembler* masm) { |
| +void StoreIC::GenerateGlobalProxy(MacroAssembler* masm, StrictModeFlag strict) { |
|
Martin Maly
2011/02/27 23:04:04
I should probably rename this to strict_mode also
Lasse Reichstein
2011/02/28 11:18:30
Do! :)
Martin Maly
2011/03/01 01:40:29
Done across the board.
|
| // ----------- S t a t e ------------- |
| // -- rax : value |
| // -- rcx : name |
| @@ -1604,14 +1605,17 @@ void StoreIC::GenerateGlobalProxy(MacroAssembler* masm) { |
| __ push(rdx); |
| __ push(rcx); |
| __ push(rax); |
| - __ push(rbx); |
| + __ Push(Smi::FromInt(NONE)); // PropertyAttributes |
| + __ Push(Smi::FromInt(strict)); |
| + __ push(rbx); // return address |
| // Do tail-call to runtime routine. |
| - __ TailCallRuntime(Runtime::kSetProperty, 3, 1); |
| + __ TailCallRuntime(Runtime::kSetProperty, 5, 1); |
| } |
| -void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { |
| +void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
| + StrictModeFlag strict_mode) { |
| // ----------- S t a t e ------------- |
| // -- rax : value |
| // -- rcx : key |
| @@ -1623,10 +1627,12 @@ void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { |
| __ push(rdx); // receiver |
| __ push(rcx); // key |
| __ push(rax); // value |
| + __ Push(Smi::FromInt(NONE)); // PropertyAttributes |
| + __ Push(Smi::FromInt(strict_mode)); // Strict mode. |
| __ push(rbx); // return address |
| // Do tail-call to runtime routine. |
| - __ TailCallRuntime(Runtime::kSetProperty, 3, 1); |
| + __ TailCallRuntime(Runtime::kSetProperty, 5, 1); |
| } |