| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 2f463981824d71347a689f6f46248251feacf534..faf768e11d93f47602d2cf2346b0071cacfadb4b 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -2689,6 +2689,31 @@ void MacroAssembler::LoadTransitionedArrayMapConditional(
|
| }
|
|
|
|
|
| +void MacroAssembler::LoadInitialArrayMap(
|
| + Register function_in, Register scratch,
|
| + Register map_out, bool can_have_holes) {
|
| + ASSERT(!function_in.is(map_out));
|
| + Label done;
|
| + mov(map_out, FieldOperand(function_in,
|
| + JSFunction::kPrototypeOrInitialMapOffset));
|
| + if (!FLAG_smi_only_arrays) {
|
| + ElementsKind kind = can_have_holes ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS;
|
| + LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
|
| + kind,
|
| + map_out,
|
| + scratch,
|
| + &done);
|
| + } else if (can_have_holes) {
|
| + LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
|
| + FAST_HOLEY_SMI_ELEMENTS,
|
| + map_out,
|
| + scratch,
|
| + &done);
|
| + }
|
| + bind(&done);
|
| +}
|
| +
|
| +
|
| void MacroAssembler::LoadGlobalContext(Register global_context) {
|
| // Load the global or builtins object from the current context.
|
| mov(global_context,
|
| @@ -2955,8 +2980,16 @@ void MacroAssembler::CheckStackAlignment() {
|
|
|
|
|
| void MacroAssembler::Abort(BailoutReason reason) {
|
| -#ifdef DEBUG
|
| + // We want to pass the msg string like a smi to avoid GC
|
| + // problems, however msg is not guaranteed to be aligned
|
| + // properly. Instead, we pass an aligned pointer that is
|
| + // a proper v8 smi, but also pass the alignment difference
|
| + // from the real pointer as a smi.
|
| const char* msg = GetBailoutReason(reason);
|
| + intptr_t p1 = reinterpret_cast<intptr_t>(msg);
|
| + intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag;
|
| + ASSERT(reinterpret_cast<Object*>(p0)->IsSmi());
|
| +#ifdef DEBUG
|
| if (msg != NULL) {
|
| RecordComment("Abort message: ");
|
| RecordComment(msg);
|
| @@ -2969,15 +3002,16 @@ void MacroAssembler::Abort(BailoutReason reason) {
|
| #endif
|
|
|
| push(eax);
|
| - push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(reason))));
|
| + push(Immediate(p0));
|
| + push(Immediate(reinterpret_cast<intptr_t>(Smi::FromInt(p1 - p0))));
|
| // Disable stub call restrictions to always allow calls to abort.
|
| if (!has_frame_) {
|
| // We don't actually want to generate a pile of code for this, so just
|
| // claim there is a stack frame, without generating one.
|
| FrameScope scope(this, StackFrame::NONE);
|
| - CallRuntime(Runtime::kAbort, 1);
|
| + CallRuntime(Runtime::kAbort, 2);
|
| } else {
|
| - CallRuntime(Runtime::kAbort, 1);
|
| + CallRuntime(Runtime::kAbort, 2);
|
| }
|
| // will not return here
|
| int3();
|
|
|