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

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

Issue 7006021: MIPS: port Fix a number of IC stubs to correctly set the call kind. (Closed)
Patch Set: Created 9 years, 6 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 | « src/mips/macro-assembler-mips.h ('k') | 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 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after
2846 sra(expected_reg, expected_reg, kSmiTagSize); 2846 sra(expected_reg, expected_reg, kSmiTagSize);
2847 lw(code_reg, FieldMemOperand(a1, JSFunction::kCodeEntryOffset)); 2847 lw(code_reg, FieldMemOperand(a1, JSFunction::kCodeEntryOffset));
2848 2848
2849 ParameterCount expected(expected_reg); 2849 ParameterCount expected(expected_reg);
2850 InvokeCode(code_reg, expected, actual, flag, call_wrapper, call_kind); 2850 InvokeCode(code_reg, expected, actual, flag, call_wrapper, call_kind);
2851 } 2851 }
2852 2852
2853 2853
2854 void MacroAssembler::InvokeFunction(JSFunction* function, 2854 void MacroAssembler::InvokeFunction(JSFunction* function,
2855 const ParameterCount& actual, 2855 const ParameterCount& actual,
2856 InvokeFlag flag) { 2856 InvokeFlag flag,
2857 CallKind call_kind) {
2857 ASSERT(function->is_compiled()); 2858 ASSERT(function->is_compiled());
2858 2859
2859 // Get the function and setup the context. 2860 // Get the function and setup the context.
2860 li(a1, Operand(Handle<JSFunction>(function))); 2861 li(a1, Operand(Handle<JSFunction>(function)));
2861 lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); 2862 lw(cp, FieldMemOperand(a1, JSFunction::kContextOffset));
2862 2863
2863 // Invoke the cached code. 2864 // Invoke the cached code.
2864 Handle<Code> code(function->code()); 2865 Handle<Code> code(function->code());
2865 ParameterCount expected(function->shared()->formal_parameter_count()); 2866 ParameterCount expected(function->shared()->formal_parameter_count());
2866 if (V8::UseCrankshaft()) { 2867 if (V8::UseCrankshaft()) {
2867 UNIMPLEMENTED_MIPS(); 2868 UNIMPLEMENTED_MIPS();
2868 } else { 2869 } else {
2869 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag); 2870 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag, call_kind);
2870 } 2871 }
2871 } 2872 }
2872 2873
2873 2874
2874 void MacroAssembler::IsObjectJSObjectType(Register heap_object, 2875 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
2875 Register map, 2876 Register map,
2876 Register scratch, 2877 Register scratch,
2877 Label* fail) { 2878 Label* fail) {
2878 lw(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); 2879 lw(map, FieldMemOperand(heap_object, HeapObject::kMapOffset));
2879 IsInstanceJSObjectType(map, scratch, fail); 2880 IsInstanceJSObjectType(map, scratch, fail);
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
3341 return TryTailCallStub(&stub); 3342 return TryTailCallStub(&stub);
3342 } 3343 }
3343 3344
3344 3345
3345 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, 3346 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
3346 InvokeFlag flag, 3347 InvokeFlag flag,
3347 const CallWrapper& call_wrapper) { 3348 const CallWrapper& call_wrapper) {
3348 GetBuiltinEntry(t9, id); 3349 GetBuiltinEntry(t9, id);
3349 if (flag == CALL_FUNCTION) { 3350 if (flag == CALL_FUNCTION) {
3350 call_wrapper.BeforeCall(CallSize(t9)); 3351 call_wrapper.BeforeCall(CallSize(t9));
3352 SetCallKind(t1, CALL_AS_METHOD);
3351 Call(t9); 3353 Call(t9);
3352 call_wrapper.AfterCall(); 3354 call_wrapper.AfterCall();
3353 } else { 3355 } else {
3354 ASSERT(flag == JUMP_FUNCTION); 3356 ASSERT(flag == JUMP_FUNCTION);
3357 SetCallKind(t1, CALL_AS_METHOD);
3355 Jump(t9); 3358 Jump(t9);
3356 } 3359 }
3357 } 3360 }
3358 3361
3359 3362
3360 void MacroAssembler::GetBuiltinFunction(Register target, 3363 void MacroAssembler::GetBuiltinFunction(Register target,
3361 Builtins::JavaScript id) { 3364 Builtins::JavaScript id) {
3362 // Load the builtins object into target register. 3365 // Load the builtins object into target register.
3363 lw(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 3366 lw(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
3364 lw(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset)); 3367 lw(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset));
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
4039 opcode == BGTZL); 4042 opcode == BGTZL);
4040 opcode = (cond == eq) ? BEQ : BNE; 4043 opcode = (cond == eq) ? BEQ : BNE;
4041 instr = (instr & ~kOpcodeMask) | opcode; 4044 instr = (instr & ~kOpcodeMask) | opcode;
4042 masm_.emit(instr); 4045 masm_.emit(instr);
4043 } 4046 }
4044 4047
4045 4048
4046 } } // namespace v8::internal 4049 } } // namespace v8::internal
4047 4050
4048 #endif // V8_TARGET_ARCH_MIPS 4051 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698