| Index: src/ia32/virtual-frame-ia32.cc
|
| ===================================================================
|
| --- src/ia32/virtual-frame-ia32.cc (revision 7006)
|
| +++ src/ia32/virtual-frame-ia32.cc (working copy)
|
| @@ -1035,28 +1035,35 @@
|
| }
|
|
|
|
|
| -Result VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) {
|
| +Result VirtualFrame::CallStoreIC(Handle<String> name,
|
| + bool is_contextual,
|
| + StrictModeFlag strict_mode) {
|
| // Value and (if not contextual) receiver are on top of the frame.
|
| // The IC expects name in ecx, value in eax, and receiver in edx.
|
| Handle<Code> ic(Isolate::Current()->builtins()->builtin(
|
| - Builtins::StoreIC_Initialize));
|
| + (strict_mode == kStrictMode) ? Builtins::StoreIC_Initialize_Strict
|
| + : Builtins::StoreIC_Initialize));
|
| +
|
| Result value = Pop();
|
| + RelocInfo::Mode mode;
|
| if (is_contextual) {
|
| PrepareForCall(0, 0);
|
| value.ToRegister(eax);
|
| __ mov(edx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
| value.Unuse();
|
| + mode = RelocInfo::CODE_TARGET_CONTEXT;
|
| } else {
|
| Result receiver = Pop();
|
| PrepareForCall(0, 0);
|
| MoveResultsToRegisters(&value, &receiver, eax, edx);
|
| + mode = RelocInfo::CODE_TARGET;
|
| }
|
| __ mov(ecx, name);
|
| - return RawCallCodeObject(ic, RelocInfo::CODE_TARGET);
|
| + return RawCallCodeObject(ic, mode);
|
| }
|
|
|
|
|
| -Result VirtualFrame::CallKeyedStoreIC() {
|
| +Result VirtualFrame::CallKeyedStoreIC(StrictModeFlag strict_mode) {
|
| // Value, key, and receiver are on the top of the frame. The IC
|
| // expects value in eax, key in ecx, and receiver in edx.
|
| Result value = Pop();
|
| @@ -1101,7 +1108,8 @@
|
| }
|
|
|
| Handle<Code> ic(Isolate::Current()->builtins()->builtin(
|
| - Builtins::KeyedStoreIC_Initialize));
|
| + (strict_mode == kStrictMode) ? Builtins::KeyedStoreIC_Initialize_Strict
|
| + : Builtins::KeyedStoreIC_Initialize));
|
| return RawCallCodeObject(ic, RelocInfo::CODE_TARGET);
|
| }
|
|
|
| @@ -1306,6 +1314,7 @@
|
|
|
|
|
| void VirtualFrame::PushUntaggedElement(Handle<Object> value) {
|
| + ASSERT(!ConstantPoolOverflowed());
|
| elements_.Add(FrameElement::ConstantElement(value, FrameElement::NOT_SYNCED));
|
| elements_[element_count() - 1].set_untagged_int32(true);
|
| }
|
| @@ -1336,6 +1345,20 @@
|
| }
|
|
|
|
|
| +void VirtualFrame::Push(Handle<Object> value) {
|
| + if (ConstantPoolOverflowed()) {
|
| + Result temp = cgen()->allocator()->Allocate();
|
| + ASSERT(temp.is_valid());
|
| + __ Set(temp.reg(), Immediate(value));
|
| + Push(&temp);
|
| + } else {
|
| + FrameElement element =
|
| + FrameElement::ConstantElement(value, FrameElement::NOT_SYNCED);
|
| + elements_.Add(element);
|
| + }
|
| +}
|
| +
|
| +
|
| #undef __
|
|
|
| } } // namespace v8::internal
|
|
|