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

Side by Side Diff: src/x64/macro-assembler-x64.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/x64/builtins-x64.cc ('k') | src/x64/macro-assembler-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 void StubReturn(int argc); 529 void StubReturn(int argc);
530 530
531 // Call a runtime routine. 531 // Call a runtime routine.
532 // Eventually this should be used for all C calls. 532 // Eventually this should be used for all C calls.
533 void CallRuntime(Runtime::Function* f, int num_arguments); 533 void CallRuntime(Runtime::Function* f, int num_arguments);
534 534
535 // Convenience function: Same as above, but takes the fid instead. 535 // Convenience function: Same as above, but takes the fid instead.
536 void CallRuntime(Runtime::FunctionId id, int num_arguments); 536 void CallRuntime(Runtime::FunctionId id, int num_arguments);
537 537
538 // Tail call of a runtime routine (jump). 538 // Tail call of a runtime routine (jump).
539 // Like JumpToBuiltin, but also takes care of passing the number 539 // Like JumpToRuntime, but also takes care of passing the number
540 // of arguments. 540 // of arguments.
541 void TailCallRuntime(const ExternalReference& ext, 541 void TailCallRuntime(const ExternalReference& ext,
542 int num_arguments, 542 int num_arguments,
543 int result_size); 543 int result_size);
544 544
545 // Jump to the builtin routine. 545 // Jump to a runtime routine.
546 void JumpToBuiltin(const ExternalReference& ext, int result_size); 546 void JumpToRuntime(const ExternalReference& ext, int result_size);
547 547
548 548
549 // --------------------------------------------------------------------------- 549 // ---------------------------------------------------------------------------
550 // Utilities 550 // Utilities
551 551
552 void Ret(); 552 void Ret();
553 553
554 struct Unresolved { 554 struct Unresolved {
555 int pc; 555 int pc;
556 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. 556 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 // object on installation. 596 // object on installation.
597 597
598 // Helper functions for generating invokes. 598 // Helper functions for generating invokes.
599 void InvokePrologue(const ParameterCount& expected, 599 void InvokePrologue(const ParameterCount& expected,
600 const ParameterCount& actual, 600 const ParameterCount& actual,
601 Handle<Code> code_constant, 601 Handle<Code> code_constant,
602 Register code_register, 602 Register code_register,
603 Label* done, 603 Label* done,
604 InvokeFlag flag); 604 InvokeFlag flag);
605 605
606 // Get the code for the given builtin. Returns if able to resolve 606 // Prepares for a call or jump to a builtin by doing two things:
607 // the function in the 'resolved' flag. 607 // 1. Emits code that fetches the builtin's function object from the context
608 // at runtime, and puts it in the register rdi.
609 // 2. Fetches the builtin's code object, and returns it in a handle, at
610 // compile time, so that later code can emit instructions to jump or call
611 // the builtin directly. If the code object has not yet been created, it
612 // returns the builtin code object for IllegalFunction, and sets the
613 // output parameter "resolved" to false. Code that uses the return value
614 // should then add the address and the builtin name to the list of fixups
615 // called unresolved_, which is fixed up by the bootstrapper.
608 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); 616 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved);
609 617
610 // Activation support. 618 // Activation support.
611 void EnterFrame(StackFrame::Type type); 619 void EnterFrame(StackFrame::Type type);
612 void LeaveFrame(StackFrame::Type type); 620 void LeaveFrame(StackFrame::Type type);
613 621
614 // Allocation support helpers. 622 // Allocation support helpers.
615 void LoadAllocationTopHelper(Register result, 623 void LoadAllocationTopHelper(Register result,
616 Register result_end, 624 Register result_end,
617 Register scratch, 625 Register scratch,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } \ 684 } \
677 masm-> 685 masm->
678 #else 686 #else
679 #define ACCESS_MASM(masm) masm-> 687 #define ACCESS_MASM(masm) masm->
680 #endif 688 #endif
681 689
682 690
683 } } // namespace v8::internal 691 } } // namespace v8::internal
684 692
685 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 693 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698