OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 V(LoadFunctionPrototype) \ | 125 V(LoadFunctionPrototype) \ |
126 V(LoadGlobalCell) \ | 126 V(LoadGlobalCell) \ |
127 V(LoadGlobalGeneric) \ | 127 V(LoadGlobalGeneric) \ |
128 V(LoadKeyedFastDoubleElement) \ | 128 V(LoadKeyedFastDoubleElement) \ |
129 V(LoadKeyedFastElement) \ | 129 V(LoadKeyedFastElement) \ |
130 V(LoadKeyedGeneric) \ | 130 V(LoadKeyedGeneric) \ |
131 V(LoadKeyedSpecializedArrayElement) \ | 131 V(LoadKeyedSpecializedArrayElement) \ |
132 V(LoadNamedField) \ | 132 V(LoadNamedField) \ |
133 V(LoadNamedFieldPolymorphic) \ | 133 V(LoadNamedFieldPolymorphic) \ |
134 V(LoadNamedGeneric) \ | 134 V(LoadNamedGeneric) \ |
| 135 V(MathFloorOfDiv) \ |
135 V(ModI) \ | 136 V(ModI) \ |
136 V(MulI) \ | 137 V(MulI) \ |
137 V(NumberTagD) \ | 138 V(NumberTagD) \ |
138 V(NumberTagI) \ | 139 V(NumberTagI) \ |
139 V(NumberUntagD) \ | 140 V(NumberUntagD) \ |
140 V(ObjectLiteral) \ | 141 V(ObjectLiteral) \ |
141 V(OsrEntry) \ | 142 V(OsrEntry) \ |
142 V(OuterContext) \ | 143 V(OuterContext) \ |
143 V(Parameter) \ | 144 V(Parameter) \ |
144 V(Power) \ | 145 V(Power) \ |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 inputs_[0] = left; | 545 inputs_[0] = left; |
545 inputs_[1] = right; | 546 inputs_[1] = right; |
546 temps_[0] = temp; | 547 temps_[0] = temp; |
547 } | 548 } |
548 | 549 |
549 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") | 550 DECLARE_CONCRETE_INSTRUCTION(DivI, "div-i") |
550 DECLARE_HYDROGEN_ACCESSOR(Div) | 551 DECLARE_HYDROGEN_ACCESSOR(Div) |
551 }; | 552 }; |
552 | 553 |
553 | 554 |
| 555 class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { |
| 556 public: |
| 557 LMathFloorOfDiv(LOperand* left, |
| 558 LOperand* right, |
| 559 LOperand* temp = NULL) { |
| 560 inputs_[0] = left; |
| 561 inputs_[1] = right; |
| 562 temps_[0] = temp; |
| 563 } |
| 564 |
| 565 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv, "math-floor-of-div") |
| 566 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) |
| 567 }; |
| 568 |
| 569 |
554 class LMulI: public LTemplateInstruction<1, 2, 0> { | 570 class LMulI: public LTemplateInstruction<1, 2, 0> { |
555 public: | 571 public: |
556 LMulI(LOperand* left, LOperand* right) { | 572 LMulI(LOperand* left, LOperand* right) { |
557 inputs_[0] = left; | 573 inputs_[0] = left; |
558 inputs_[1] = right; | 574 inputs_[1] = right; |
559 } | 575 } |
560 | 576 |
561 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") | 577 DECLARE_CONCRETE_INSTRUCTION(MulI, "mul-i") |
562 DECLARE_HYDROGEN_ACCESSOR(Mul) | 578 DECLARE_HYDROGEN_ACCESSOR(Mul) |
563 }; | 579 }; |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2238 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } | 2254 pending_deoptimization_ast_id_(AstNode::kNoNumber) { } |
2239 | 2255 |
2240 // Build the sequence for the graph. | 2256 // Build the sequence for the graph. |
2241 LChunk* Build(); | 2257 LChunk* Build(); |
2242 | 2258 |
2243 // Declare methods that deal with the individual node types. | 2259 // Declare methods that deal with the individual node types. |
2244 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); | 2260 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); |
2245 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 2261 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
2246 #undef DECLARE_DO | 2262 #undef DECLARE_DO |
2247 | 2263 |
| 2264 static HValue* SimplifiedDividendForMathFloorOfDiv(HValue* val); |
| 2265 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); |
| 2266 |
2248 private: | 2267 private: |
2249 enum Status { | 2268 enum Status { |
2250 UNUSED, | 2269 UNUSED, |
2251 BUILDING, | 2270 BUILDING, |
2252 DONE, | 2271 DONE, |
2253 ABORTED | 2272 ABORTED |
2254 }; | 2273 }; |
2255 | 2274 |
2256 LChunk* chunk() const { return chunk_; } | 2275 LChunk* chunk() const { return chunk_; } |
2257 CompilationInfo* info() const { return info_; } | 2276 CompilationInfo* info() const { return info_; } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2373 | 2392 |
2374 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2393 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2375 }; | 2394 }; |
2376 | 2395 |
2377 #undef DECLARE_HYDROGEN_ACCESSOR | 2396 #undef DECLARE_HYDROGEN_ACCESSOR |
2378 #undef DECLARE_CONCRETE_INSTRUCTION | 2397 #undef DECLARE_CONCRETE_INSTRUCTION |
2379 | 2398 |
2380 } } // namespace v8::int | 2399 } } // namespace v8::int |
2381 | 2400 |
2382 #endif // V8_X64_LITHIUM_X64_H_ | 2401 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |