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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 104663004: Preview of a first step towards unification of hydrogen calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 } else { 2572 } else {
2573 ASSERT(flag == JUMP_FUNCTION); 2573 ASSERT(flag == JUMP_FUNCTION);
2574 SetCallKind(ecx, call_kind); 2574 SetCallKind(ecx, call_kind);
2575 jmp(code); 2575 jmp(code);
2576 } 2576 }
2577 bind(&done); 2577 bind(&done);
2578 } 2578 }
2579 } 2579 }
2580 2580
2581 2581
2582 void MacroAssembler::InvokeCode(Handle<Code> code,
2583 const ParameterCount& expected,
2584 const ParameterCount& actual,
2585 RelocInfo::Mode rmode,
2586 InvokeFlag flag,
2587 const CallWrapper& call_wrapper,
2588 CallKind call_kind) {
2589 // You can't call a function without a valid frame.
2590 ASSERT(flag == JUMP_FUNCTION || has_frame());
2591
2592 Label done;
2593 Operand dummy(eax, 0);
2594 bool definitely_mismatches = false;
2595 InvokePrologue(expected, actual, code, dummy, &done, &definitely_mismatches,
2596 flag, Label::kNear, call_wrapper, call_kind);
2597 if (!definitely_mismatches) {
2598 if (flag == CALL_FUNCTION) {
2599 call_wrapper.BeforeCall(CallSize(code, rmode));
2600 SetCallKind(ecx, call_kind);
2601 call(code, rmode);
2602 call_wrapper.AfterCall();
2603 } else {
2604 ASSERT(flag == JUMP_FUNCTION);
2605 SetCallKind(ecx, call_kind);
2606 jmp(code, rmode);
2607 }
2608 bind(&done);
2609 }
2610 }
2611
2612
2613 void MacroAssembler::InvokeFunction(Register fun, 2582 void MacroAssembler::InvokeFunction(Register fun,
2614 const ParameterCount& actual, 2583 const ParameterCount& actual,
2615 InvokeFlag flag, 2584 InvokeFlag flag,
2616 const CallWrapper& call_wrapper, 2585 const CallWrapper& call_wrapper,
2617 CallKind call_kind) { 2586 CallKind call_kind) {
2618 // You can't call a function without a valid frame. 2587 // You can't call a function without a valid frame.
2619 ASSERT(flag == JUMP_FUNCTION || has_frame()); 2588 ASSERT(flag == JUMP_FUNCTION || has_frame());
2620 2589
2621 ASSERT(fun.is(edi)); 2590 ASSERT(fun.is(edi));
2622 mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 2591 mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
3694 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); 3663 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS));
3695 j(equal, found); 3664 j(equal, found);
3696 mov(current, FieldOperand(current, Map::kPrototypeOffset)); 3665 mov(current, FieldOperand(current, Map::kPrototypeOffset));
3697 cmp(current, Immediate(factory->null_value())); 3666 cmp(current, Immediate(factory->null_value()));
3698 j(not_equal, &loop_again); 3667 j(not_equal, &loop_again);
3699 } 3668 }
3700 3669
3701 } } // namespace v8::internal 3670 } } // namespace v8::internal
3702 3671
3703 #endif // V8_TARGET_ARCH_IA32 3672 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698