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

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

Issue 8199004: Reimplement Function.prototype.bind. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 9 years, 2 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/code-stubs-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 719 }
720 720
721 void Move(const Operand& dst, Smi* source) { 721 void Move(const Operand& dst, Smi* source) {
722 Register constant = GetSmiConstant(source); 722 Register constant = GetSmiConstant(source);
723 movq(dst, constant); 723 movq(dst, constant);
724 } 724 }
725 725
726 void Push(Smi* smi); 726 void Push(Smi* smi);
727 void Test(const Operand& dst, Smi* source); 727 void Test(const Operand& dst, Smi* source);
728 728
729
729 // --------------------------------------------------------------------------- 730 // ---------------------------------------------------------------------------
730 // String macros. 731 // String macros.
731 732
732 // If object is a string, its map is loaded into object_map. 733 // If object is a string, its map is loaded into object_map.
733 void JumpIfNotString(Register object, 734 void JumpIfNotString(Register object,
734 Register object_map, 735 Register object_map,
735 Label* not_string, 736 Label* not_string,
736 Label::Distance near_jump = Label::kFar); 737 Label::Distance near_jump = Label::kFar);
737 738
738 739
(...skipping 25 matching lines...) Expand all
764 // --------------------------------------------------------------------------- 765 // ---------------------------------------------------------------------------
765 // Macro instructions. 766 // Macro instructions.
766 767
767 // Load a register with a long value as efficiently as possible. 768 // Load a register with a long value as efficiently as possible.
768 void Set(Register dst, int64_t x); 769 void Set(Register dst, int64_t x);
769 void Set(const Operand& dst, int64_t x); 770 void Set(const Operand& dst, int64_t x);
770 771
771 // Move if the registers are not identical. 772 // Move if the registers are not identical.
772 void Move(Register target, Register source); 773 void Move(Register target, Register source);
773 774
775 // Bit-field support.
776 void TestBit(const Operand& dst, int bit_index);
777
774 // Handle support 778 // Handle support
775 void Move(Register dst, Handle<Object> source); 779 void Move(Register dst, Handle<Object> source);
776 void Move(const Operand& dst, Handle<Object> source); 780 void Move(const Operand& dst, Handle<Object> source);
777 void Cmp(Register dst, Handle<Object> source); 781 void Cmp(Register dst, Handle<Object> source);
778 void Cmp(const Operand& dst, Handle<Object> source); 782 void Cmp(const Operand& dst, Handle<Object> source);
779 void Cmp(Register dst, Smi* src); 783 void Cmp(Register dst, Smi* src);
780 void Cmp(const Operand& dst, Smi* src); 784 void Cmp(const Operand& dst, Smi* src);
781 void Push(Handle<Object> source); 785 void Push(Handle<Object> source);
782 786
783 // Emit code to discard a non-negative number of pointer-sized elements 787 // Emit code to discard a non-negative number of pointer-sized elements
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 void NegativeZeroTest(Register result, Register op1, Register op2, 1071 void NegativeZeroTest(Register result, Register op1, Register op2,
1068 Register scratch, Label* then_label); 1072 Register scratch, Label* then_label);
1069 1073
1070 // Try to get function prototype of a function and puts the value in 1074 // Try to get function prototype of a function and puts the value in
1071 // the result register. Checks that the function really is a 1075 // the result register. Checks that the function really is a
1072 // function and jumps to the miss label if the fast checks fail. The 1076 // function and jumps to the miss label if the fast checks fail. The
1073 // function register will be untouched; the other register may be 1077 // function register will be untouched; the other register may be
1074 // clobbered. 1078 // clobbered.
1075 void TryGetFunctionPrototype(Register function, 1079 void TryGetFunctionPrototype(Register function,
1076 Register result, 1080 Register result,
1077 Label* miss); 1081 Label* miss,
1082 bool miss_on_bound_function = false);
1078 1083
1079 // Generates code for reporting that an illegal operation has 1084 // Generates code for reporting that an illegal operation has
1080 // occurred. 1085 // occurred.
1081 void IllegalOperation(int num_arguments); 1086 void IllegalOperation(int num_arguments);
1082 1087
1083 // Picks out an array index from the hash field. 1088 // Picks out an array index from the hash field.
1084 // Register use: 1089 // Register use:
1085 // hash - holds the index's hash. Clobbered. 1090 // hash - holds the index's hash. Clobbered.
1086 // index - holds the overwritten index on exit. 1091 // index - holds the overwritten index on exit.
1087 void IndexFromHash(Register hash, Register index); 1092 void IndexFromHash(Register hash, Register index);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 masm->popfd(); \ 1447 masm->popfd(); \
1443 } \ 1448 } \
1444 masm-> 1449 masm->
1445 #else 1450 #else
1446 #define ACCESS_MASM(masm) masm-> 1451 #define ACCESS_MASM(masm) masm->
1447 #endif 1452 #endif
1448 1453
1449 } } // namespace v8::internal 1454 } } // namespace v8::internal
1450 1455
1451 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1456 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698