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

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: Merge fix Created 6 years, 11 months 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after
2549 call_wrapper.AfterCall(); 2549 call_wrapper.AfterCall();
2550 } else { 2550 } else {
2551 ASSERT(flag == JUMP_FUNCTION); 2551 ASSERT(flag == JUMP_FUNCTION);
2552 jmp(code); 2552 jmp(code);
2553 } 2553 }
2554 bind(&done); 2554 bind(&done);
2555 } 2555 }
2556 } 2556 }
2557 2557
2558 2558
2559 void MacroAssembler::InvokeCode(Handle<Code> code,
2560 const ParameterCount& expected,
2561 const ParameterCount& actual,
2562 RelocInfo::Mode rmode,
2563 InvokeFlag flag,
2564 const CallWrapper& call_wrapper) {
2565 // You can't call a function without a valid frame.
2566 ASSERT(flag == JUMP_FUNCTION || has_frame());
2567
2568 Label done;
2569 Operand dummy(eax, 0);
2570 bool definitely_mismatches = false;
2571 InvokePrologue(expected, actual, code, dummy, &done, &definitely_mismatches,
2572 flag, Label::kNear, call_wrapper);
2573 if (!definitely_mismatches) {
2574 if (flag == CALL_FUNCTION) {
2575 call_wrapper.BeforeCall(CallSize(code, rmode));
2576 call(code, rmode);
2577 call_wrapper.AfterCall();
2578 } else {
2579 ASSERT(flag == JUMP_FUNCTION);
2580 jmp(code, rmode);
2581 }
2582 bind(&done);
2583 }
2584 }
2585
2586
2587 void MacroAssembler::InvokeFunction(Register fun, 2559 void MacroAssembler::InvokeFunction(Register fun,
2588 const ParameterCount& actual, 2560 const ParameterCount& actual,
2589 InvokeFlag flag, 2561 InvokeFlag flag,
2590 const CallWrapper& call_wrapper) { 2562 const CallWrapper& call_wrapper) {
2591 // You can't call a function without a valid frame. 2563 // You can't call a function without a valid frame.
2592 ASSERT(flag == JUMP_FUNCTION || has_frame()); 2564 ASSERT(flag == JUMP_FUNCTION || has_frame());
2593 2565
2594 ASSERT(fun.is(edi)); 2566 ASSERT(fun.is(edi));
2595 mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); 2567 mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
2596 mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 2568 mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
3665 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); 3637 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS));
3666 j(equal, found); 3638 j(equal, found);
3667 mov(current, FieldOperand(current, Map::kPrototypeOffset)); 3639 mov(current, FieldOperand(current, Map::kPrototypeOffset));
3668 cmp(current, Immediate(factory->null_value())); 3640 cmp(current, Immediate(factory->null_value()));
3669 j(not_equal, &loop_again); 3641 j(not_equal, &loop_again);
3670 } 3642 }
3671 3643
3672 } } // namespace v8::internal 3644 } } // namespace v8::internal
3673 3645
3674 #endif // V8_TARGET_ARCH_IA32 3646 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698