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

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

Issue 91963003: Cleanup in the CallStubCompiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix check 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
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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 SharedFunctionInfo::kFormalParameterCountOffset)); 1216 SharedFunctionInfo::kFormalParameterCountOffset));
1217 SmiUntag(expected_reg); 1217 SmiUntag(expected_reg);
1218 ldr(code_reg, 1218 ldr(code_reg,
1219 FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); 1219 FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
1220 1220
1221 ParameterCount expected(expected_reg); 1221 ParameterCount expected(expected_reg);
1222 InvokeCode(code_reg, expected, actual, flag, call_wrapper, call_kind); 1222 InvokeCode(code_reg, expected, actual, flag, call_wrapper, call_kind);
1223 } 1223 }
1224 1224
1225 1225
1226 void MacroAssembler::InvokeFunction(Handle<JSFunction> function, 1226 void MacroAssembler::InvokeFunction(Register function,
1227 const ParameterCount& expected, 1227 const ParameterCount& expected,
1228 const ParameterCount& actual, 1228 const ParameterCount& actual,
1229 InvokeFlag flag, 1229 InvokeFlag flag,
1230 const CallWrapper& call_wrapper, 1230 const CallWrapper& call_wrapper,
1231 CallKind call_kind) { 1231 CallKind call_kind) {
1232 // You can't call a function without a valid frame. 1232 // You can't call a function without a valid frame.
1233 ASSERT(flag == JUMP_FUNCTION || has_frame()); 1233 ASSERT(flag == JUMP_FUNCTION || has_frame());
1234 1234
1235 // Contract with called JS functions requires that function is passed in r1.
1236 ASSERT(function.is(r1));
1237
1235 // Get the function and setup the context. 1238 // Get the function and setup the context.
1236 Move(r1, function);
1237 ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); 1239 ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
1238 1240
1239 // We call indirectly through the code field in the function to 1241 // We call indirectly through the code field in the function to
1240 // allow recompilation to take effect without changing any of the 1242 // allow recompilation to take effect without changing any of the
1241 // call sites. 1243 // call sites.
1242 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); 1244 ldr(r3, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
1243 InvokeCode(r3, expected, actual, flag, call_wrapper, call_kind); 1245 InvokeCode(r3, expected, actual, flag, call_wrapper, call_kind);
1244 } 1246 }
1245 1247
1246 1248
1249 void MacroAssembler::InvokeFunction(Handle<JSFunction> function,
1250 const ParameterCount& expected,
1251 const ParameterCount& actual,
1252 InvokeFlag flag,
1253 const CallWrapper& call_wrapper,
1254 CallKind call_kind) {
1255 Move(r1, function);
1256 InvokeFunction(r1, expected, actual, flag, call_wrapper, call_kind);
1257 }
1258
1259
1247 void MacroAssembler::IsObjectJSObjectType(Register heap_object, 1260 void MacroAssembler::IsObjectJSObjectType(Register heap_object,
1248 Register map, 1261 Register map,
1249 Register scratch, 1262 Register scratch,
1250 Label* fail) { 1263 Label* fail) {
1251 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset)); 1264 ldr(map, FieldMemOperand(heap_object, HeapObject::kMapOffset));
1252 IsInstanceJSObjectType(map, scratch, fail); 1265 IsInstanceJSObjectType(map, scratch, fail);
1253 } 1266 }
1254 1267
1255 1268
1256 void MacroAssembler::IsInstanceJSObjectType(Register map, 1269 void MacroAssembler::IsInstanceJSObjectType(Register map,
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
4050 void CodePatcher::EmitCondition(Condition cond) { 4063 void CodePatcher::EmitCondition(Condition cond) {
4051 Instr instr = Assembler::instr_at(masm_.pc_); 4064 Instr instr = Assembler::instr_at(masm_.pc_);
4052 instr = (instr & ~kCondMask) | cond; 4065 instr = (instr & ~kCondMask) | cond;
4053 masm_.emit(instr); 4066 masm_.emit(instr);
4054 } 4067 }
4055 4068
4056 4069
4057 } } // namespace v8::internal 4070 } } // namespace v8::internal
4058 4071
4059 #endif // V8_TARGET_ARCH_ARM 4072 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698