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

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

Issue 91963003: Cleanup in the CallStubCompiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased / addressed feedback 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('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 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2629 mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 2629 mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
2630 mov(ebx, FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); 2630 mov(ebx, FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset));
2631 SmiUntag(ebx); 2631 SmiUntag(ebx);
2632 2632
2633 ParameterCount expected(ebx); 2633 ParameterCount expected(ebx);
2634 InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), 2634 InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset),
2635 expected, actual, flag, call_wrapper, call_kind); 2635 expected, actual, flag, call_wrapper, call_kind);
2636 } 2636 }
2637 2637
2638 2638
2639 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, 2639 void MacroAssembler::InvokeFunction(Register fun,
2640 const ParameterCount& expected, 2640 const ParameterCount& expected,
2641 const ParameterCount& actual, 2641 const ParameterCount& actual,
2642 InvokeFlag flag, 2642 InvokeFlag flag,
2643 const CallWrapper& call_wrapper, 2643 const CallWrapper& call_wrapper,
2644 CallKind call_kind) { 2644 CallKind call_kind) {
2645 // You can't call a function without a valid frame. 2645 // You can't call a function without a valid frame.
2646 ASSERT(flag == JUMP_FUNCTION || has_frame()); 2646 ASSERT(flag == JUMP_FUNCTION || has_frame());
2647 2647
2648 // Get the function and setup the context. 2648 ASSERT(fun.is(edi));
2649 LoadHeapObject(edi, function);
2650 mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); 2649 mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
2651 2650
2652 // We call indirectly through the code field in the function to
2653 // allow recompilation to take effect without changing any of the
2654 // call sites.
2655 InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), 2651 InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset),
2656 expected, actual, flag, call_wrapper, call_kind); 2652 expected, actual, flag, call_wrapper, call_kind);
2657 } 2653 }
2658 2654
2659 2655
2656 void MacroAssembler::InvokeFunction(Handle<JSFunction> function,
2657 const ParameterCount& expected,
2658 const ParameterCount& actual,
2659 InvokeFlag flag,
2660 const CallWrapper& call_wrapper,
2661 CallKind call_kind) {
2662 LoadHeapObject(edi, function);
2663 InvokeFunction(edi, expected, actual, flag, call_wrapper, call_kind);
2664 }
2665
2666
2660 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, 2667 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
2661 InvokeFlag flag, 2668 InvokeFlag flag,
2662 const CallWrapper& call_wrapper) { 2669 const CallWrapper& call_wrapper) {
2663 // You can't call a builtin without a valid frame. 2670 // You can't call a builtin without a valid frame.
2664 ASSERT(flag == JUMP_FUNCTION || has_frame()); 2671 ASSERT(flag == JUMP_FUNCTION || has_frame());
2665 2672
2666 // Rely on the assertion to check that the number of provided 2673 // Rely on the assertion to check that the number of provided
2667 // arguments match the expected number of arguments. Fake a 2674 // arguments match the expected number of arguments. Fake a
2668 // parameter count to avoid emitting code to do the check. 2675 // parameter count to avoid emitting code to do the check.
2669 ParameterCount expected(0); 2676 ParameterCount expected(0);
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
3693 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); 3700 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS));
3694 j(equal, found); 3701 j(equal, found);
3695 mov(current, FieldOperand(current, Map::kPrototypeOffset)); 3702 mov(current, FieldOperand(current, Map::kPrototypeOffset));
3696 cmp(current, Immediate(factory->null_value())); 3703 cmp(current, Immediate(factory->null_value()));
3697 j(not_equal, &loop_again); 3704 j(not_equal, &loop_again);
3698 } 3705 }
3699 3706
3700 } } // namespace v8::internal 3707 } } // namespace v8::internal
3701 3708
3702 #endif // V8_TARGET_ARCH_IA32 3709 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698