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

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

Issue 7086029: Fix a number of IC stubs to correctly set the call kind. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Load global object from rsi on x64. 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 ldr(code_reg, 1041 ldr(code_reg,
1042 FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); 1042 FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
1043 1043
1044 ParameterCount expected(expected_reg); 1044 ParameterCount expected(expected_reg);
1045 InvokeCode(code_reg, expected, actual, flag, call_wrapper, call_kind); 1045 InvokeCode(code_reg, expected, actual, flag, call_wrapper, call_kind);
1046 } 1046 }
1047 1047
1048 1048
1049 void MacroAssembler::InvokeFunction(JSFunction* function, 1049 void MacroAssembler::InvokeFunction(JSFunction* function,
1050 const ParameterCount& actual, 1050 const ParameterCount& actual,
1051 InvokeFlag flag) { 1051 InvokeFlag flag,
1052 CallKind call_kind) {
1052 ASSERT(function->is_compiled()); 1053 ASSERT(function->is_compiled());
1053 1054
1054 // Get the function and setup the context. 1055 // Get the function and setup the context.
1055 mov(r1, Operand(Handle<JSFunction>(function))); 1056 mov(r1, Operand(Handle<JSFunction>(function)));
1056 ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 1057 ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
1057 1058
1058 // Invoke the cached code. 1059 // Invoke the cached code.
1059 Handle<Code> code(function->code()); 1060 Handle<Code> code(function->code());
1060 ParameterCount expected(function->shared()->formal_parameter_count()); 1061 ParameterCount expected(function->shared()->formal_parameter_count());
1061 if (V8::UseCrankshaft()) { 1062 if (V8::UseCrankshaft()) {
1062 // TODO(kasperl): For now, we always call indirectly through the 1063 // TODO(kasperl): For now, we always call indirectly through the
1063 // code field in the function to allow recompilation to take effect 1064 // code field in the function to allow recompilation to take effect
1064 // without changing any of the call sites. 1065 // without changing any of the call sites.
1065 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); 1066 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
1066 InvokeCode(r3, expected, actual, flag); 1067 InvokeCode(r3, expected, actual, flag, NullCallWrapper(), call_kind);
1067 } else { 1068 } else {
1068 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag); 1069 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag, call_kind);
1069 } 1070 }
1070 } 1071 }
1071 1072
1072 1073
1073 void MacroAssembler::IsObjectJSObjectType(Register heap_object, 1074 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
1074 Register map, 1075 Register map,
1075 Register scratch, 1076 Register scratch,
1076 Label* fail) { 1077 Label* fail) {
1077 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); 1078 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset));
1078 IsInstanceJSObjectType(map, scratch, fail); 1079 IsInstanceJSObjectType(map, scratch, fail);
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 return TryTailCallStub(&stub); 2363 return TryTailCallStub(&stub);
2363 } 2364 }
2364 2365
2365 2366
2366 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, 2367 void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
2367 InvokeFlag flag, 2368 InvokeFlag flag,
2368 const CallWrapper& call_wrapper) { 2369 const CallWrapper& call_wrapper) {
2369 GetBuiltinEntry(r2, id); 2370 GetBuiltinEntry(r2, id);
2370 if (flag == CALL_FUNCTION) { 2371 if (flag == CALL_FUNCTION) {
2371 call_wrapper.BeforeCall(CallSize(r2)); 2372 call_wrapper.BeforeCall(CallSize(r2));
2373 SetCallKind(r5, CALL_AS_METHOD);
2372 Call(r2); 2374 Call(r2);
2373 call_wrapper.AfterCall(); 2375 call_wrapper.AfterCall();
2374 } else { 2376 } else {
2375 ASSERT(flag == JUMP_FUNCTION); 2377 ASSERT(flag == JUMP_FUNCTION);
2378 SetCallKind(r5, CALL_AS_METHOD);
2376 Jump(r2); 2379 Jump(r2);
2377 } 2380 }
2378 } 2381 }
2379 2382
2380 2383
2381 void MacroAssembler::GetBuiltinFunction(Register target, 2384 void MacroAssembler::GetBuiltinFunction(Register target,
2382 Builtins::JavaScript id) { 2385 Builtins::JavaScript id) {
2383 // Load the builtins object into target register. 2386 // Load the builtins object into target register.
2384 ldr(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 2387 ldr(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
2385 ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset)); 2388 ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset));
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3154 void CodePatcher::EmitCondition(Condition cond) { 3157 void CodePatcher::EmitCondition(Condition cond) {
3155 Instr instr = Assembler::instr_at(masm_.pc_); 3158 Instr instr = Assembler::instr_at(masm_.pc_);
3156 instr = (instr & ~kCondMask) | cond; 3159 instr = (instr & ~kCondMask) | cond;
3157 masm_.emit(instr); 3160 masm_.emit(instr);
3158 } 3161 }
3159 3162
3160 3163
3161 } } // namespace v8::internal 3164 } } // namespace v8::internal
3162 3165
3163 #endif // V8_TARGET_ARCH_ARM 3166 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698