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

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

Issue 8357010: Handlify the stub cache lookup and patching for CallIC and KeyedCallIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do not assume functions are compiled when specializing. 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 } 1094 }
1095 1095
1096 1096
1097 void MacroAssembler::InvokeFunction(JSFunction* function, 1097 void MacroAssembler::InvokeFunction(JSFunction* function,
1098 const ParameterCount& actual, 1098 const ParameterCount& actual,
1099 InvokeFlag flag, 1099 InvokeFlag flag,
1100 CallKind call_kind) { 1100 CallKind call_kind) {
1101 // You can't call a function without a valid frame. 1101 // You can't call a function without a valid frame.
1102 ASSERT(flag == JUMP_FUNCTION || has_frame()); 1102 ASSERT(flag == JUMP_FUNCTION || has_frame());
1103 1103
1104 ASSERT(function->is_compiled());
1105
1106 // Get the function and setup the context. 1104 // Get the function and setup the context.
1107 mov(r1, Operand(Handle<JSFunction>(function))); 1105 mov(r1, Operand(Handle<JSFunction>(function)));
1108 ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 1106 ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
1109 1107
1110 // Invoke the cached code.
1111 Handle<Code> code(function->code());
1112 ParameterCount expected(function->shared()->formal_parameter_count()); 1108 ParameterCount expected(function->shared()->formal_parameter_count());
1113 if (V8::UseCrankshaft()) { 1109 // We call indirectly through the code field in the function to
1114 // TODO(kasperl): For now, we always call indirectly through the 1110 // allow recompilation to take effect without changing any of the
1115 // code field in the function to allow recompilation to take effect 1111 // call sites.
1116 // without changing any of the call sites. 1112 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
1117 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); 1113 InvokeCode(r3, expected, actual, flag, NullCallWrapper(), call_kind);
1118 InvokeCode(r3, expected, actual, flag, NullCallWrapper(), call_kind);
1119 } else {
1120 InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag, call_kind);
1121 }
1122 } 1114 }
1123 1115
1124 1116
1125 void MacroAssembler::IsObjectJSObjectType(Register heap_object, 1117 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
1126 Register map, 1118 Register map,
1127 Register scratch, 1119 Register scratch,
1128 Label* fail) { 1120 Label* fail) {
1129 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); 1121 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset));
1130 IsInstanceJSObjectType(map, scratch, fail); 1122 IsInstanceJSObjectType(map, scratch, fail);
1131 } 1123 }
(...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after
3662 void CodePatcher::EmitCondition(Condition cond) { 3654 void CodePatcher::EmitCondition(Condition cond) {
3663 Instr instr = Assembler::instr_at(masm_.pc_); 3655 Instr instr = Assembler::instr_at(masm_.pc_);
3664 instr = (instr & ~kCondMask) | cond; 3656 instr = (instr & ~kCondMask) | cond;
3665 masm_.emit(instr); 3657 masm_.emit(instr);
3666 } 3658 }
3667 3659
3668 3660
3669 } } // namespace v8::internal 3661 } } // namespace v8::internal
3670 3662
3671 #endif // V8_TARGET_ARCH_ARM 3663 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698