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

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

Issue 652118: Refactored TailCallRuntime (splitted to TailCallRuntime and TailCallExternalReference) (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 void MacroAssembler::CallExternalReference(const ExternalReference& ext, 1227 void MacroAssembler::CallExternalReference(const ExternalReference& ext,
1228 int num_arguments) { 1228 int num_arguments) {
1229 mov(r0, Operand(num_arguments)); 1229 mov(r0, Operand(num_arguments));
1230 mov(r1, Operand(ext)); 1230 mov(r1, Operand(ext));
1231 1231
1232 CEntryStub stub(1); 1232 CEntryStub stub(1);
1233 CallStub(&stub); 1233 CallStub(&stub);
1234 } 1234 }
1235 1235
1236 1236
1237 void MacroAssembler::TailCallRuntime(const ExternalReference& ext, 1237 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
1238 int num_arguments, 1238 int num_arguments,
1239 int result_size) { 1239 int result_size) {
1240 // TODO(1236192): Most runtime routines don't need the number of 1240 // TODO(1236192): Most runtime routines don't need the number of
1241 // arguments passed in because it is constant. At some point we 1241 // arguments passed in because it is constant. At some point we
1242 // should remove this need and make the runtime routine entry code 1242 // should remove this need and make the runtime routine entry code
1243 // smarter. 1243 // smarter.
1244 mov(r0, Operand(num_arguments)); 1244 mov(r0, Operand(num_arguments));
1245 JumpToRuntime(ext); 1245 JumpToExternalReference(ext);
1246 } 1246 }
1247 1247
1248 1248
1249 void MacroAssembler::JumpToRuntime(const ExternalReference& builtin) { 1249 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
1250 int num_arguments,
1251 int result_size) {
1252 TailCallExternalReference(ExternalReference(fid), num_arguments, result_size);
1253 }
1254
1255
1256 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) {
1250 #if defined(__thumb__) 1257 #if defined(__thumb__)
1251 // Thumb mode builtin. 1258 // Thumb mode builtin.
1252 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1); 1259 ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1);
1253 #endif 1260 #endif
1254 mov(r1, Operand(builtin)); 1261 mov(r1, Operand(builtin));
1255 CEntryStub stub(1); 1262 CEntryStub stub(1);
1256 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); 1263 Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
1257 } 1264 }
1258 1265
1259 1266
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 } 1474 }
1468 1475
1469 1476
1470 void CodePatcher::Emit(Address addr) { 1477 void CodePatcher::Emit(Address addr) {
1471 masm()->emit(reinterpret_cast<Instr>(addr)); 1478 masm()->emit(reinterpret_cast<Instr>(addr));
1472 } 1479 }
1473 #endif // ENABLE_DEBUGGER_SUPPORT 1480 #endif // ENABLE_DEBUGGER_SUPPORT
1474 1481
1475 1482
1476 } } // namespace v8::internal 1483 } } // namespace v8::internal
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