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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/builtins-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 void StubReturn(int argc); 247 void StubReturn(int argc);
248 248
249 // Call a runtime routine. 249 // Call a runtime routine.
250 // Eventually this should be used for all C calls. 250 // Eventually this should be used for all C calls.
251 void CallRuntime(Runtime::Function* f, int num_arguments); 251 void CallRuntime(Runtime::Function* f, int num_arguments);
252 252
253 // Convenience function: Same as above, but takes the fid instead. 253 // Convenience function: Same as above, but takes the fid instead.
254 void CallRuntime(Runtime::FunctionId id, int num_arguments); 254 void CallRuntime(Runtime::FunctionId id, int num_arguments);
255 255
256 // Tail call of a runtime routine (jump). 256 // Tail call of a runtime routine (jump).
257 // Like JumpToBuiltin, but also takes care of passing the number 257 // Like JumpToRuntime, but also takes care of passing the number
258 // of arguments. 258 // of arguments.
259 void TailCallRuntime(const ExternalReference& ext, 259 void TailCallRuntime(const ExternalReference& ext,
260 int num_arguments, 260 int num_arguments,
261 int result_size); 261 int result_size);
262 262
263 // Jump to the builtin routine. 263 // Jump to a runtime routine.
264 void JumpToBuiltin(const ExternalReference& ext); 264 void JumpToRuntime(const ExternalReference& ext);
265 265
266 266
267 // --------------------------------------------------------------------------- 267 // ---------------------------------------------------------------------------
268 // Utilities 268 // Utilities
269 269
270 void Ret(); 270 void Ret();
271 271
272 struct Unresolved { 272 struct Unresolved {
273 int pc; 273 int pc;
274 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. 274 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // code object on installation. 314 // code object on installation.
315 315
316 // Helper functions for generating invokes. 316 // Helper functions for generating invokes.
317 void InvokePrologue(const ParameterCount& expected, 317 void InvokePrologue(const ParameterCount& expected,
318 const ParameterCount& actual, 318 const ParameterCount& actual,
319 Handle<Code> code_constant, 319 Handle<Code> code_constant,
320 const Operand& code_operand, 320 const Operand& code_operand,
321 Label* done, 321 Label* done,
322 InvokeFlag flag); 322 InvokeFlag flag);
323 323
324 // Get the code for the given builtin. Returns if able to resolve 324 // Prepares for a call or jump to a builtin by doing two things:
325 // the function in the 'resolved' flag. 325 // 1. Emits code that fetches the builtin's function object from the context
326 // at runtime, and puts it in the register rdi.
327 // 2. Fetches the builtin's code object, and returns it in a handle, at
328 // compile time, so that later code can emit instructions to jump or call
329 // the builtin directly. If the code object has not yet been created, it
330 // returns the builtin code object for IllegalFunction, and sets the
331 // output parameter "resolved" to false. Code that uses the return value
332 // should then add the address and the builtin name to the list of fixups
333 // called unresolved_, which is fixed up by the bootstrapper.
326 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); 334 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved);
327 335
328 // Activation support. 336 // Activation support.
329 void EnterFrame(StackFrame::Type type); 337 void EnterFrame(StackFrame::Type type);
330 void LeaveFrame(StackFrame::Type type); 338 void LeaveFrame(StackFrame::Type type);
331 339
332 // Allocation support helpers. 340 // Allocation support helpers.
333 void LoadAllocationTopHelper(Register result, 341 void LoadAllocationTopHelper(Register result,
334 Register result_end, 342 Register result_end,
335 Register scratch, 343 Register scratch,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } \ 402 } \
395 masm-> 403 masm->
396 #else 404 #else
397 #define ACCESS_MASM(masm) masm-> 405 #define ACCESS_MASM(masm) masm->
398 #endif 406 #endif
399 407
400 408
401 } } // namespace v8::internal 409 } } // namespace v8::internal
402 410
403 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 411 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698