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

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

Issue 218025: Rename JumpToBuiltin to JumpToRuntime. Add comment to ResolveBuiltin. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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/builtins-arm.cc ('k') | src/arm/macro-assembler-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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 void StubReturn(int argc); 250 void StubReturn(int argc);
251 251
252 // Call a runtime routine. 252 // Call a runtime routine.
253 // Eventually this should be used for all C calls. 253 // Eventually this should be used for all C calls.
254 void CallRuntime(Runtime::Function* f, int num_arguments); 254 void CallRuntime(Runtime::Function* f, int num_arguments);
255 255
256 // Convenience function: Same as above, but takes the fid instead. 256 // Convenience function: Same as above, but takes the fid instead.
257 void CallRuntime(Runtime::FunctionId fid, int num_arguments); 257 void CallRuntime(Runtime::FunctionId fid, int num_arguments);
258 258
259 // Tail call of a runtime routine (jump). 259 // Tail call of a runtime routine (jump).
260 // Like JumpToBuiltin, but also takes care of passing the number 260 // Like JumpToRuntime, but also takes care of passing the number
261 // of parameters. 261 // of parameters.
262 void TailCallRuntime(const ExternalReference& ext, 262 void TailCallRuntime(const ExternalReference& ext,
263 int num_arguments, 263 int num_arguments,
264 int result_size); 264 int result_size);
265 265
266 // Jump to the builtin routine. 266 // Jump to a runtime routine.
267 void JumpToBuiltin(const ExternalReference& builtin); 267 void JumpToRuntime(const ExternalReference& builtin);
268 268
269 // Invoke specified builtin JavaScript function. Adds an entry to 269 // Invoke specified builtin JavaScript function. Adds an entry to
270 // the unresolved list if the name does not resolve. 270 // the unresolved list if the name does not resolve.
271 void InvokeBuiltin(Builtins::JavaScript id, InvokeJSFlags flags); 271 void InvokeBuiltin(Builtins::JavaScript id, InvokeJSFlags flags);
272 272
273 // Store the code object for the given builtin in the target register and 273 // Store the code object for the given builtin in the target register and
274 // setup the function in r1. 274 // setup the function in r1.
275 void GetBuiltinEntry(Register target, Builtins::JavaScript id); 275 void GetBuiltinEntry(Register target, Builtins::JavaScript id);
276 276
277 struct Unresolved { 277 struct Unresolved {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 // object on installation. 322 // object on installation.
323 323
324 // Helper functions for generating invokes. 324 // Helper functions for generating invokes.
325 void InvokePrologue(const ParameterCount& expected, 325 void InvokePrologue(const ParameterCount& expected,
326 const ParameterCount& actual, 326 const ParameterCount& actual,
327 Handle<Code> code_constant, 327 Handle<Code> code_constant,
328 Register code_reg, 328 Register code_reg,
329 Label* done, 329 Label* done,
330 InvokeFlag flag); 330 InvokeFlag flag);
331 331
332 // Get the code for the given builtin. Returns if able to resolve 332 // Prepares for a call or jump to a builtin by doing two things:
333 // the function in the 'resolved' flag. 333 // 1. Emits code that fetches the builtin's function object from the context
334 // at runtime, and puts it in the register rdi.
335 // 2. Fetches the builtin's code object, and returns it in a handle, at
336 // compile time, so that later code can emit instructions to jump or call
337 // the builtin directly. If the code object has not yet been created, it
338 // returns the builtin code object for IllegalFunction, and sets the
339 // output parameter "resolved" to false. Code that uses the return value
340 // should then add the address and the builtin name to the list of fixups
341 // called unresolved_, which is fixed up by the bootstrapper.
334 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); 342 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved);
335 343
336 // Activation support. 344 // Activation support.
337 void EnterFrame(StackFrame::Type type); 345 void EnterFrame(StackFrame::Type type);
338 void LeaveFrame(StackFrame::Type type); 346 void LeaveFrame(StackFrame::Type type);
339 }; 347 };
340 348
341 349
342 #ifdef ENABLE_DEBUGGER_SUPPORT 350 #ifdef ENABLE_DEBUGGER_SUPPORT
343 // The code patcher is used to patch (typically) small parts of code e.g. for 351 // The code patcher is used to patch (typically) small parts of code e.g. for
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 391 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
384 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 392 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
385 #else 393 #else
386 #define ACCESS_MASM(masm) masm-> 394 #define ACCESS_MASM(masm) masm->
387 #endif 395 #endif
388 396
389 397
390 } } // namespace v8::internal 398 } } // namespace v8::internal
391 399
392 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 400 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698