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

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

Issue 6113004: Version 3.0.7 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
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
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.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 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 11 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_ARM_LITHIUM_ARM_H_ 28 #ifndef V8_ARM_LITHIUM_ARM_H_
29 #define V8_ARM_LITHIUM_ARM_H_ 29 #define V8_ARM_LITHIUM_ARM_H_
30 30
31 #include "hydrogen.h" 31 #include "hydrogen.h"
32 #include "lithium-allocator.h" 32 #include "lithium-allocator.h"
33 #include "lithium.h"
33 #include "safepoint-table.h" 34 #include "safepoint-table.h"
34 35
35 namespace v8 { 36 namespace v8 {
36 namespace internal { 37 namespace internal {
37 38
38 // Forward declarations. 39 // Forward declarations.
39 class LCodeGen; 40 class LCodeGen;
40 class LEnvironment; 41 class LEnvironment;
41 class Translation; 42 class Translation;
42 43
(...skipping 12 matching lines...) Expand all
55 // LBitI 56 // LBitI
56 // LBoundsCheck 57 // LBoundsCheck
57 // LCmpID 58 // LCmpID
58 // LCmpIDAndBranch 59 // LCmpIDAndBranch
59 // LCmpJSObjectEq 60 // LCmpJSObjectEq
60 // LCmpJSObjectEqAndBranch 61 // LCmpJSObjectEqAndBranch
61 // LCmpT 62 // LCmpT
62 // LDivI 63 // LDivI
63 // LInstanceOf 64 // LInstanceOf
64 // LInstanceOfAndBranch 65 // LInstanceOfAndBranch
66 // LInstanceOfKnownGlobal
65 // LLoadKeyedFastElement 67 // LLoadKeyedFastElement
66 // LLoadKeyedGeneric 68 // LLoadKeyedGeneric
67 // LModI 69 // LModI
68 // LMulI 70 // LMulI
69 // LShiftI 71 // LShiftI
70 // LSubI 72 // LSubI
71 // LCallConstantFunction 73 // LCallConstantFunction
72 // LCallFunction 74 // LCallFunction
73 // LCallGlobal 75 // LCallGlobal
74 // LCallKeyed 76 // LCallKeyed
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 V(DivI) \ 199 V(DivI) \
198 V(DoubleToI) \ 200 V(DoubleToI) \
199 V(FixedArrayLength) \ 201 V(FixedArrayLength) \
200 V(FunctionLiteral) \ 202 V(FunctionLiteral) \
201 V(Gap) \ 203 V(Gap) \
202 V(GlobalObject) \ 204 V(GlobalObject) \
203 V(GlobalReceiver) \ 205 V(GlobalReceiver) \
204 V(Goto) \ 206 V(Goto) \
205 V(InstanceOf) \ 207 V(InstanceOf) \
206 V(InstanceOfAndBranch) \ 208 V(InstanceOfAndBranch) \
209 V(InstanceOfKnownGlobal) \
207 V(Integer32ToDouble) \ 210 V(Integer32ToDouble) \
208 V(IsNull) \ 211 V(IsNull) \
209 V(IsNullAndBranch) \ 212 V(IsNullAndBranch) \
210 V(IsObject) \ 213 V(IsObject) \
211 V(IsObjectAndBranch) \ 214 V(IsObjectAndBranch) \
212 V(IsSmi) \ 215 V(IsSmi) \
213 V(IsSmiAndBranch) \ 216 V(IsSmiAndBranch) \
214 V(JSArrayLength) \ 217 V(JSArrayLength) \
215 V(HasInstanceType) \ 218 V(HasInstanceType) \
216 V(HasInstanceTypeAndBranch) \ 219 V(HasInstanceTypeAndBranch) \
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 325
323 private: 326 private:
324 SetOncePointer<LEnvironment> environment_; 327 SetOncePointer<LEnvironment> environment_;
325 SetOncePointer<LPointerMap> pointer_map_; 328 SetOncePointer<LPointerMap> pointer_map_;
326 SetOncePointer<LOperand> result_; 329 SetOncePointer<LOperand> result_;
327 HValue* hydrogen_value_; 330 HValue* hydrogen_value_;
328 SetOncePointer<LEnvironment> deoptimization_environment_; 331 SetOncePointer<LEnvironment> deoptimization_environment_;
329 }; 332 };
330 333
331 334
332 class LGapNode;
333
334
335 class LGapResolver BASE_EMBEDDED {
336 public:
337 LGapResolver(const ZoneList<LMoveOperands>* moves, LOperand* marker_operand);
338 const ZoneList<LMoveOperands>* ResolveInReverseOrder();
339
340 private:
341 LGapNode* LookupNode(LOperand* operand);
342 bool CanReach(LGapNode* a, LGapNode* b, int visited_id);
343 bool CanReach(LGapNode* a, LGapNode* b);
344 void RegisterMove(LMoveOperands move);
345 void AddResultMove(LOperand* from, LOperand* to);
346 void AddResultMove(LGapNode* from, LGapNode* to);
347 void ResolveCycle(LGapNode* start);
348
349 ZoneList<LGapNode*> nodes_;
350 ZoneList<LGapNode*> identified_cycles_;
351 ZoneList<LMoveOperands> result_;
352 LOperand* marker_operand_;
353 int next_visited_id_;
354 int bailout_after_ast_id_;
355 };
356
357
358 class LParallelMove : public ZoneObject { 335 class LParallelMove : public ZoneObject {
359 public: 336 public:
360 LParallelMove() : move_operands_(4) { } 337 LParallelMove() : move_operands_(4) { }
361 338
362 void AddMove(LOperand* from, LOperand* to) { 339 void AddMove(LOperand* from, LOperand* to) {
363 move_operands_.Add(LMoveOperands(from, to)); 340 move_operands_.Add(LMoveOperands(from, to));
364 } 341 }
365 342
366 bool IsRedundant() const; 343 bool IsRedundant() const;
367 344
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 963
987 int true_block_id() const { return true_block_id_; } 964 int true_block_id() const { return true_block_id_; }
988 int false_block_id() const { return false_block_id_; } 965 int false_block_id() const { return false_block_id_; }
989 966
990 private: 967 private:
991 int true_block_id_; 968 int true_block_id_;
992 int false_block_id_; 969 int false_block_id_;
993 }; 970 };
994 971
995 972
973 class LInstanceOfKnownGlobal: public LUnaryOperation {
974 public:
975 explicit LInstanceOfKnownGlobal(LOperand* left)
976 : LUnaryOperation(left) { }
977
978 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal,
979 "instance-of-known-global")
980 DECLARE_HYDROGEN_ACCESSOR(InstanceOfKnownGlobal)
981
982 Handle<JSFunction> function() const { return hydrogen()->function(); }
983 };
984
985
996 class LBoundsCheck: public LBinaryOperation { 986 class LBoundsCheck: public LBinaryOperation {
997 public: 987 public:
998 LBoundsCheck(LOperand* index, LOperand* length) 988 LBoundsCheck(LOperand* index, LOperand* length)
999 : LBinaryOperation(index, length) { } 989 : LBinaryOperation(index, length) { }
1000 990
1001 LOperand* index() const { return left(); } 991 LOperand* index() const { return left(); }
1002 LOperand* length() const { return right(); } 992 LOperand* length() const { return right(); }
1003 993
1004 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check") 994 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds-check")
1005 }; 995 };
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 }; 1531 };
1542 1532
1543 1533
1544 class LStoreNamedField: public LStoreNamed { 1534 class LStoreNamedField: public LStoreNamed {
1545 public: 1535 public:
1546 LStoreNamedField(LOperand* obj, 1536 LStoreNamedField(LOperand* obj,
1547 Handle<Object> name, 1537 Handle<Object> name,
1548 LOperand* val, 1538 LOperand* val,
1549 bool in_object, 1539 bool in_object,
1550 int offset, 1540 int offset,
1551 LOperand* temp,
1552 bool needs_write_barrier, 1541 bool needs_write_barrier,
1553 Handle<Map> transition) 1542 Handle<Map> transition)
1554 : LStoreNamed(obj, name, val), 1543 : LStoreNamed(obj, name, val),
1555 is_in_object_(in_object), 1544 is_in_object_(in_object),
1556 offset_(offset), 1545 offset_(offset),
1557 temp_(temp),
1558 needs_write_barrier_(needs_write_barrier), 1546 needs_write_barrier_(needs_write_barrier),
1559 transition_(transition) { } 1547 transition_(transition) { }
1560 1548
1561 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 1549 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
1562 1550
1563 bool is_in_object() { return is_in_object_; } 1551 bool is_in_object() { return is_in_object_; }
1564 int offset() { return offset_; } 1552 int offset() { return offset_; }
1565 LOperand* temp() { return temp_; }
1566 bool needs_write_barrier() { return needs_write_barrier_; } 1553 bool needs_write_barrier() { return needs_write_barrier_; }
1567 Handle<Map> transition() const { return transition_; } 1554 Handle<Map> transition() const { return transition_; }
1568 void set_transition(Handle<Map> map) { transition_ = map; } 1555 void set_transition(Handle<Map> map) { transition_ = map; }
1569 1556
1570 private: 1557 private:
1571 bool is_in_object_; 1558 bool is_in_object_;
1572 int offset_; 1559 int offset_;
1573 LOperand* temp_;
1574 bool needs_write_barrier_; 1560 bool needs_write_barrier_;
1575 Handle<Map> transition_; 1561 Handle<Map> transition_;
1576 }; 1562 };
1577 1563
1578 1564
1579 class LStoreNamedGeneric: public LStoreNamed { 1565 class LStoreNamedGeneric: public LStoreNamed {
1580 public: 1566 public:
1581 LStoreNamedGeneric(LOperand* obj, 1567 LStoreNamedGeneric(LOperand* obj,
1582 Handle<Object> name, 1568 Handle<Object> name,
1583 LOperand* val) 1569 LOperand* val)
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 public: 1617 public:
1632 explicit LCheckFunction(LOperand* use) : LUnaryOperation(use) { } 1618 explicit LCheckFunction(LOperand* use) : LUnaryOperation(use) { }
1633 1619
1634 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") 1620 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
1635 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) 1621 DECLARE_HYDROGEN_ACCESSOR(CheckFunction)
1636 }; 1622 };
1637 1623
1638 1624
1639 class LCheckInstanceType: public LUnaryOperation { 1625 class LCheckInstanceType: public LUnaryOperation {
1640 public: 1626 public:
1641 LCheckInstanceType(LOperand* use, LOperand* temp) 1627 explicit LCheckInstanceType(LOperand* use) : LUnaryOperation(use) { }
1642 : LUnaryOperation(use), temp_(temp) { }
1643 1628
1644 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type") 1629 DECLARE_CONCRETE_INSTRUCTION(CheckInstanceType, "check-instance-type")
1645 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType) 1630 DECLARE_HYDROGEN_ACCESSOR(CheckInstanceType)
1646 1631
1647 LOperand* temp() const { return temp_; } 1632 LOperand* temp() const { return temp_; }
1648 1633
1649 private: 1634 private:
1650 LOperand* temp_; 1635 LOperand* temp_;
1651 }; 1636 };
1652 1637
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2101 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2117 }; 2102 };
2118 2103
2119 #undef DECLARE_HYDROGEN_ACCESSOR 2104 #undef DECLARE_HYDROGEN_ACCESSOR
2120 #undef DECLARE_INSTRUCTION 2105 #undef DECLARE_INSTRUCTION
2121 #undef DECLARE_CONCRETE_INSTRUCTION 2106 #undef DECLARE_CONCRETE_INSTRUCTION
2122 2107
2123 } } // namespace v8::internal 2108 } } // namespace v8::internal
2124 2109
2125 #endif // V8_ARM_LITHIUM_ARM_H_ 2110 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698