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

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

Issue 543207: Removing redundant stub for runtime native calls. (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/debug-arm.cc ('k') | src/code-stubs.h » ('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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 // All parameters are on the stack. r0 has the return value after call. 1028 // All parameters are on the stack. r0 has the return value after call.
1029 1029
1030 // If the expected number of arguments of the runtime function is 1030 // If the expected number of arguments of the runtime function is
1031 // constant, we check that the actual number of arguments match the 1031 // constant, we check that the actual number of arguments match the
1032 // expectation. 1032 // expectation.
1033 if (f->nargs >= 0 && f->nargs != num_arguments) { 1033 if (f->nargs >= 0 && f->nargs != num_arguments) {
1034 IllegalOperation(num_arguments); 1034 IllegalOperation(num_arguments);
1035 return; 1035 return;
1036 } 1036 }
1037 1037
1038 Runtime::FunctionId function_id = 1038 // TODO(1236192): Most runtime routines don't need the number of
1039 static_cast<Runtime::FunctionId>(f->stub_id); 1039 // arguments passed in because it is constant. At some point we
1040 RuntimeStub stub(function_id, num_arguments); 1040 // should remove this need and make the runtime routine entry code
1041 // smarter.
1042 mov(r0, Operand(num_arguments));
1043 mov(r1, Operand(ExternalReference(f)));
1044 CEntryStub stub(1);
1041 CallStub(&stub); 1045 CallStub(&stub);
1042 } 1046 }
1043 1047
1044 1048
1045 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) { 1049 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) {
1046 CallRuntime(Runtime::FunctionForId(fid), num_arguments); 1050 CallRuntime(Runtime::FunctionForId(fid), num_arguments);
1047 } 1051 }
1048 1052
1049 1053
1050 void MacroAssembler::TailCallRuntime(const ExternalReference& ext, 1054 void MacroAssembler::TailCallRuntime(const ExternalReference& ext,
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 } 1294 }
1291 1295
1292 1296
1293 void CodePatcher::Emit(Address addr) { 1297 void CodePatcher::Emit(Address addr) {
1294 masm()->emit(reinterpret_cast<Instr>(addr)); 1298 masm()->emit(reinterpret_cast<Instr>(addr));
1295 } 1299 }
1296 #endif // ENABLE_DEBUGGER_SUPPORT 1300 #endif // ENABLE_DEBUGGER_SUPPORT
1297 1301
1298 1302
1299 } } // namespace v8::internal 1303 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/debug-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698