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

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

Issue 8365026: MIPS: port Handlify the stub cache lookup and patching for CallIC and KeyedCallIC. (Closed)
Patch Set: Created 9 years, 2 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
« no previous file with comments | « no previous file | src/mips/stub-cache-mips.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3598 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 } 3609 }
3610 3610
3611 3611
3612 void MacroAssembler::InvokeFunction(JSFunction* function, 3612 void MacroAssembler::InvokeFunction(JSFunction* function,
3613 const ParameterCount& actual, 3613 const ParameterCount& actual,
3614 InvokeFlag flag, 3614 InvokeFlag flag,
3615 CallKind call_kind) { 3615 CallKind call_kind) {
3616 // You can't call a function without a valid frame. 3616 // You can't call a function without a valid frame.
3617 ASSERT(flag == JUMP_FUNCTION || has_frame()); 3617 ASSERT(flag == JUMP_FUNCTION || has_frame());
3618 3618
3619 ASSERT(function->is_compiled());
3620
3621 // Get the function and setup the context. 3619 // Get the function and setup the context.
3622 li(a1, Operand(Handle<JSFunction>(function))); 3620 li(a1, Operand(Handle<JSFunction>(function)));
3623 lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); 3621 lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset));
3624 3622
3625 // Invoke the cached code.
3626 Handle<Code> code(function->code());
3627 ParameterCount expected(function->shared()->formal_parameter_count()); 3623 ParameterCount expected(function->shared()->formal_parameter_count());
3628 if (V8::UseCrankshaft()) { 3624 // We call indirectly through the code field in the function to
3629 // TODO(kasperl): For now, we always call indirectly through the 3625 // allow recompilation to take effect without changing any of the
3630 // code field in the function to allow recompilation to take effect 3626 // call sites.
3631 // without changing any of the call sites. 3627 lw(a3, FieldMemOperand(a1, JSFunction::kCodeEntryOffset));
3632 lw(a3, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); 3628 InvokeCode(a3, expected, actual, flag, NullCallWrapper(), call_kind);
3633 InvokeCode(a3, expected, actual, flag, NullCallWrapper(), call_kind);
3634 } else {
3635 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag, call_kind);
3636 }
3637 } 3629 }
3638 3630
3639 3631
3640 void MacroAssembler::IsObjectJSObjectType(Register heap_object, 3632 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
3641 Register map, 3633 Register map,
3642 Register scratch, 3634 Register scratch,
3643 Label* fail) { 3635 Label* fail) {
3644 lw(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); 3636 lw(map, FieldMemOperand(heap_object, HeapObject::kMapOffset));
3645 IsInstanceJSObjectType(map, scratch, fail); 3637 IsInstanceJSObjectType(map, scratch, fail);
3646 } 3638 }
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
5135 opcode == BGTZL); 5127 opcode == BGTZL);
5136 opcode = (cond == eq) ? BEQ : BNE; 5128 opcode = (cond == eq) ? BEQ : BNE;
5137 instr = (instr & ~kOpcodeMask) | opcode; 5129 instr = (instr & ~kOpcodeMask) | opcode;
5138 masm_.emit(instr); 5130 masm_.emit(instr);
5139 } 5131 }
5140 5132
5141 5133
5142 } } // namespace v8::internal 5134 } } // namespace v8::internal
5143 5135
5144 #endif // V8_TARGET_ARCH_MIPS 5136 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698