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

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 9 years, 11 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
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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 999
998 int true_block_id() const { return true_block_id_; } 1000 int true_block_id() const { return true_block_id_; }
999 int false_block_id() const { return false_block_id_; } 1001 int false_block_id() const { return false_block_id_; }
1000 1002
1001 private: 1003 private:
1002 int true_block_id_; 1004 int true_block_id_;
1003 int false_block_id_; 1005 int false_block_id_;
1004 }; 1006 };
1005 1007
1006 1008
1009 class LInstanceOfKnownGlobal: public LUnaryOperation {
1010 public:
1011 LInstanceOfKnownGlobal(LOperand* left, LOperand* temp)
1012 : LUnaryOperation(left), temp_(temp) { }
1013
1014 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
1015 "instance-of-known-global")
1016 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
1017
1018 Handle<JSFunction> function() const { return hydrogen()->function(); }
1019 LOperand* temp() const { return temp_; }
1020
1021 private:
1022 LOperand* temp_;
1023 };
1024
1025
1007 class LBoundsCheck: public LBinaryOperation { 1026 class LBoundsCheck: public LBinaryOperation {
1008 public: 1027 public:
1009 LBoundsCheck(LOperand* index, LOperand* length) 1028 LBoundsCheck(LOperand* index, LOperand* length)
1010 : LBinaryOperation(index, length) { } 1029 : LBinaryOperation(index, length) { }
1011 1030
1012 LOperand* index() const { return left(); } 1031 LOperand* index() const { return left(); }
1013 LOperand* length() const { return right(); } 1032 LOperand* length() const { return right(); }
1014 1033
1015 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") 1034 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check")
1016 }; 1035 };
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 2092
2074 enum CanDeoptimize { CAN_DEOPTIMIZE_EAGERLY, CANNOT_DEOPTIMIZE_EAGERLY }; 2093 enum CanDeoptimize { CAN_DEOPTIMIZE_EAGERLY, CANNOT_DEOPTIMIZE_EAGERLY };
2075 2094
2076 // By default we assume that instruction sequences generated for calls 2095 // By default we assume that instruction sequences generated for calls
2077 // cannot deoptimize eagerly and we do not attach environment to this 2096 // cannot deoptimize eagerly and we do not attach environment to this
2078 // instruction. 2097 // instruction.
2079 LInstruction* MarkAsCall( 2098 LInstruction* MarkAsCall(
2080 LInstruction* instr, 2099 LInstruction* instr,
2081 HInstruction* hinstr, 2100 HInstruction* hinstr,
2082 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY); 2101 CanDeoptimize can_deoptimize = CANNOT_DEOPTIMIZE_EAGERLY);
2102 LInstruction* MarkAsSaveDoubles(LInstruction* instr);
2083 2103
2084 LInstruction* SetInstructionPendingDeoptimizationEnvironment( 2104 LInstruction* SetInstructionPendingDeoptimizationEnvironment(
2085 LInstruction* instr, int ast_id); 2105 LInstruction* instr, int ast_id);
2086 void ClearInstructionPendingDeoptimizationEnvironment(); 2106 void ClearInstructionPendingDeoptimizationEnvironment();
2087 2107
2088 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env); 2108 LEnvironment* CreateEnvironment(HEnvironment* hydrogen_env);
2089 2109
2090 // Temporary operand that may be a memory location. 2110 // Temporary operand that may be a memory location.
2091 LOperand* Temp(); 2111 LOperand* Temp();
2092 // Temporary operand that must be in a register. 2112 // Temporary operand that must be in a register.
(...skipping 26 matching lines...) Expand all
2119 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2139 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2120 }; 2140 };
2121 2141
2122 #undef DECLARE_HYDROGEN_ACCESSOR 2142 #undef DECLARE_HYDROGEN_ACCESSOR
2123 #undef DECLARE_INSTRUCTION 2143 #undef DECLARE_INSTRUCTION
2124 #undef DECLARE_CONCRETE_INSTRUCTION 2144 #undef DECLARE_CONCRETE_INSTRUCTION
2125 2145
2126 } } // namespace v8::internal 2146 } } // namespace v8::internal
2127 2147
2128 #endif // V8_IA32_LITHIUM_IA32_H_ 2148 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698