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

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 5990005: Optimize instanceof further... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // LBitI 56 // LBitI
57 // LBoundsCheck 57 // LBoundsCheck
58 // LCmpID 58 // LCmpID
59 // LCmpIDAndBranch 59 // LCmpIDAndBranch
60 // LCmpJSObjectEq 60 // LCmpJSObjectEq
61 // LCmpJSObjectEqAndBranch 61 // LCmpJSObjectEqAndBranch
62 // LCmpT 62 // LCmpT
63 // LDivI 63 // LDivI
64 // LInstanceOf 64 // LInstanceOf
65 // LInstanceOfAndBranch 65 // LInstanceOfAndBranch
66 // LInstanceOfKnownGlobal
66 // LLoadKeyedFastElement 67 // LLoadKeyedFastElement
67 // LLoadKeyedGeneric 68 // LLoadKeyedGeneric
68 // LModI 69 // LModI
69 // LMulI 70 // LMulI
70 // LPower 71 // LPower
71 // LShiftI 72 // LShiftI
72 // LSubI 73 // LSubI
73 // LCallConstantFunction 74 // LCallConstantFunction
74 // LCallFunction 75 // LCallFunction
75 // LCallGlobal 76 // LCallGlobal
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 V(Deoptimize) \ 199 V(Deoptimize) \
199 V(DivI) \ 200 V(DivI) \
200 V(DoubleToI) \ 201 V(DoubleToI) \
201 V(FunctionLiteral) \ 202 V(FunctionLiteral) \
202 V(Gap) \ 203 V(Gap) \
203 V(GlobalObject) \ 204 V(GlobalObject) \
204 V(GlobalReceiver) \ 205 V(GlobalReceiver) \
205 V(Goto) \ 206 V(Goto) \
206 V(InstanceOf) \ 207 V(InstanceOf) \
207 V(InstanceOfAndBranch) \ 208 V(InstanceOfAndBranch) \
209 V(InstanceOfKnownGlobal) \
208 V(Integer32ToDouble) \ 210 V(Integer32ToDouble) \
209 V(IsNull) \ 211 V(IsNull) \
210 V(IsNullAndBranch) \ 212 V(IsNullAndBranch) \
211 V(IsObject) \ 213 V(IsObject) \
212 V(IsObjectAndBranch) \ 214 V(IsObjectAndBranch) \
213 V(IsSmi) \ 215 V(IsSmi) \
214 V(IsSmiAndBranch) \ 216 V(IsSmiAndBranch) \
215 V(HasInstanceType) \ 217 V(HasInstanceType) \
216 V(HasInstanceTypeAndBranch) \ 218 V(HasInstanceTypeAndBranch) \
217 V(HasCachedArrayIndex) \ 219 V(HasCachedArrayIndex) \
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 967
966 DECLARE_CONCRETE_INSTRUCTION(CmpTAndBranch, "cmp-t-and-branch") 968 DECLARE_CONCRETE_INSTRUCTION(CmpTAndBranch, "cmp-t-and-branch")
967 969
968 int true_block_id() const { return true_block_id_; } 970 int true_block_id() const { return true_block_id_; }
969 int false_block_id() const { return false_block_id_; } 971 int false_block_id() const { return false_block_id_; }
970 972
971 private: 973 private:
972 int true_block_id_; 974 int true_block_id_;
973 int false_block_id_; 975 int false_block_id_;
974 }; 976 };
975 977
Mads Ager (chromium) 2011/01/04 17:25:58 Accidental edit?
Søren Thygesen Gjesse 2011/01/05 09:28:00 Done.
976
977 class LInstanceOf: public LBinaryOperation { 978 class LInstanceOf: public LBinaryOperation {
978 public: 979 public:
979 LInstanceOf(LOperand* left, LOperand* right) 980 LInstanceOf(LOperand* left, LOperand* right)
980 : LBinaryOperation(left, right) { } 981 : LBinaryOperation(left, right) { }
981 982
982 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of") 983 DECLARE_CONCRETE_INSTRUCTION(InstanceOf, "instance-of")
983 }; 984 };
984 985
985 986
986 class LInstanceOfAndBranch: public LInstanceOf { 987 class LInstanceOfAndBranch: public LInstanceOf {
(...skipping 10 matching lines...) Expand all
997 998
998 int true_block_id() const { return true_block_id_; } 999 int true_block_id() const { return true_block_id_; }
999 int false_block_id() const { return false_block_id_; } 1000 int false_block_id() const { return false_block_id_; }
1000 1001
1001 private: 1002 private:
1002 int true_block_id_; 1003 int true_block_id_;
1003 int false_block_id_; 1004 int false_block_id_;
1004 }; 1005 };
1005 1006
1006 1007
1008 class LInstanceOfKnownGlobal: public LUnaryOperation {
1009 public:
1010 LInstanceOfKnownGlobal(LOperand* left, LOperand* temp)
1011 : LUnaryOperation(left), temp_(temp) { }
1012
1013 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
1014 "instance-of-known-global")
1015 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
1016
1017 Handle<JSFunction> function() const { return hydrogen()->function(); }
1018 LOperand* temp() const { return temp_; }
1019
1020 private:
1021 LOperand* temp_;
1022 };
1023
1024
1007 class LBoundsCheck: public LBinaryOperation { 1025 class LBoundsCheck: public LBinaryOperation {
1008 public: 1026 public:
1009 LBoundsCheck(LOperand* index, LOperand* length) 1027 LBoundsCheck(LOperand* index, LOperand* length)
1010 : LBinaryOperation(index, length) { } 1028 : LBinaryOperation(index, length) { }
1011 1029
1012 LOperand* index() const { return left(); } 1030 LOperand* index() const { return left(); }
1013 LOperand* length() const { return right(); } 1031 LOperand* length() const { return right(); }
1014 1032
1015 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") 1033 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check")
1016 }; 1034 };
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 2091
2074 enum CanDeoptimize { CAN_DEOPTIMIZE_EAGERLY, CANNOT_DEOPTIMIZE_EAGERLY }; 2092 enum CanDeoptimize { CAN_DEOPTIMIZE_EAGERLY, CANNOT_DEOPTIMIZE_EAGERLY };
2075 2093
2076 // By default we assume that instruction sequences generated for calls 2094 // By default we assume that instruction sequences generated for calls
2077 // cannot deoptimize eagerly and we do not attach environment to this 2095 // cannot deoptimize eagerly and we do not attach environment to this
2078 // instruction. 2096 // instruction.
2079 LInstruction* MarkAsCall( 2097 LInstruction* MarkAsCall(
2080 LInstruction* instr, 2098 LInstruction* instr,
2081 HInstruction* hinstr, 2099 HInstruction* hinstr,
2082 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY); 2100 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY);
2101 LInstruction* MarkAsSaveDoubles(LInstruction* instr);
2083 2102
2084 LInstruction* SetInstructionPendingDeoptimizationEnvironment( 2103 LInstruction* SetInstructionPendingDeoptimizationEnvironment(
2085 LInstruction* instr, int ast_id); 2104 LInstruction* instr, int ast_id);
2086 void ClearInstructionPendingDeoptimizationEnvironment(); 2105 void ClearInstructionPendingDeoptimizationEnvironment();
2087 2106
2088 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env); 2107 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env);
2089 2108
2090 // Temporary operand that may be a memory location. 2109 // Temporary operand that may be a memory location.
2091 LOperand* Temp(); 2110 LOperand* Temp();
2092 // Temporary operand that must be in a register. 2111 // Temporary operand that must be in a register.
(...skipping 26 matching lines...) Expand all
2119 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2138 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2120 }; 2139 };
2121 2140
2122 #undef DECLARE_HYDROGEN_ACCESSOR 2141 #undef DECLARE_HYDROGEN_ACCESSOR
2123 #undef DECLARE_INSTRUCTION 2142 #undef DECLARE_INSTRUCTION
2124 #undef DECLARE_CONCRETE_INSTRUCTION 2143 #undef DECLARE_CONCRETE_INSTRUCTION
2125 2144
2126 } } // namespace v8::internal 2145 } } // namespace v8::internal
2127 2146
2128 #endif // V8_IA32_LITHIUM_IA32_H_ 2147 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698