| Index: src/x64/virtual-frame-x64.cc
|
| diff --git a/src/x64/virtual-frame-x64.cc b/src/x64/virtual-frame-x64.cc
|
| index 0726b50f6c6e3551dd1f543d044203425b56b300..fcb7463b65a3694f2b2d59f43af1eb4bb76dbe4f 100644
|
| --- a/src/x64/virtual-frame-x64.cc
|
| +++ b/src/x64/virtual-frame-x64.cc
|
| @@ -65,7 +65,7 @@ void VirtualFrame::Enter() {
|
| #ifdef DEBUG
|
| // Verify that rdi contains a JS function. The following code
|
| // relies on rax being available for use.
|
| - Condition not_smi = masm()->CheckNotSmi(rdi);
|
| + Condition not_smi = NegateCondition(masm()->CheckSmi(rdi));
|
| __ Check(not_smi,
|
| "VirtualFrame::Enter - rdi is not a function (smi check).");
|
| __ CmpObjectType(rdi, JS_FUNCTION_TYPE, rax);
|
| @@ -197,6 +197,14 @@ void VirtualFrame::EmitPush(Immediate immediate) {
|
| }
|
|
|
|
|
| +void VirtualFrame::EmitPush(Smi* smi_value) {
|
| + ASSERT(stack_pointer_ == element_count() - 1);
|
| + elements_.Add(FrameElement::MemoryElement());
|
| + stack_pointer_++;
|
| + __ Push(smi_value);
|
| +}
|
| +
|
| +
|
| void VirtualFrame::EmitPush(Handle<Object> value) {
|
| ASSERT(stack_pointer_ == element_count() - 1);
|
| elements_.Add(FrameElement::MemoryElement());
|
| @@ -841,7 +849,7 @@ void VirtualFrame::SyncElementByPushing(int index) {
|
|
|
| switch (element.type()) {
|
| case FrameElement::INVALID:
|
| - __ push(Immediate(Smi::FromInt(0)));
|
| + __ Push(Smi::FromInt(0));
|
| break;
|
|
|
| case FrameElement::MEMORY:
|
| @@ -1005,7 +1013,7 @@ Result VirtualFrame::CallConstructor(int arg_count) {
|
| function.ToRegister(rdi);
|
|
|
| // Constructors are called with the number of arguments in register
|
| - // eax for now. Another option would be to have separate construct
|
| + // rax for now. Another option would be to have separate construct
|
| // call trampolines per different arguments counts encountered.
|
| Result num_args = cgen()->allocator()->Allocate(rax);
|
| ASSERT(num_args.is_valid());
|
|
|