| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/accessors.h" | 8 #include "src/accessors.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/ast/ast-type-bounds.h" | 10 #include "src/ast/ast-type-bounds.h" |
| (...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1372 | 1372 |
| 1373 HValue* BuildCheckAndGrowElementsCapacity(HValue* object, HValue* elements, | 1373 HValue* BuildCheckAndGrowElementsCapacity(HValue* object, HValue* elements, |
| 1374 ElementsKind kind, HValue* length, | 1374 ElementsKind kind, HValue* length, |
| 1375 HValue* capacity, HValue* key); | 1375 HValue* capacity, HValue* key); |
| 1376 | 1376 |
| 1377 HValue* BuildCopyElementsOnWrite(HValue* object, | 1377 HValue* BuildCopyElementsOnWrite(HValue* object, |
| 1378 HValue* elements, | 1378 HValue* elements, |
| 1379 ElementsKind kind, | 1379 ElementsKind kind, |
| 1380 HValue* length); | 1380 HValue* length); |
| 1381 | 1381 |
| 1382 void BuildTransitionElementsKind(HValue* object, | |
| 1383 HValue* map, | |
| 1384 ElementsKind from_kind, | |
| 1385 ElementsKind to_kind, | |
| 1386 bool is_jsarray); | |
| 1387 | |
| 1388 HValue* BuildNumberToString(HValue* object, AstType* type); | 1382 HValue* BuildNumberToString(HValue* object, AstType* type); |
| 1389 HValue* BuildToNumber(HValue* input); | 1383 HValue* BuildToNumber(HValue* input); |
| 1390 HValue* BuildToObject(HValue* receiver); | 1384 HValue* BuildToObject(HValue* receiver); |
| 1391 | 1385 |
| 1392 HValue* BuildUncheckedDictionaryElementLoad(HValue* receiver, | |
| 1393 HValue* elements, HValue* key, | |
| 1394 HValue* hash); | |
| 1395 | |
| 1396 // ES6 section 7.4.7 CreateIterResultObject ( value, done ) | 1386 // ES6 section 7.4.7 CreateIterResultObject ( value, done ) |
| 1397 HValue* BuildCreateIterResultObject(HValue* value, HValue* done); | 1387 HValue* BuildCreateIterResultObject(HValue* value, HValue* done); |
| 1398 | 1388 |
| 1399 // Allocates a new object according with the given allocation properties. | 1389 // Allocates a new object according with the given allocation properties. |
| 1400 HAllocate* BuildAllocate(HValue* object_size, | 1390 HAllocate* BuildAllocate(HValue* object_size, |
| 1401 HType type, | 1391 HType type, |
| 1402 InstanceType instance_type, | 1392 InstanceType instance_type, |
| 1403 HAllocationMode allocation_mode); | 1393 HAllocationMode allocation_mode); |
| 1404 // Computes the sum of two string lengths, taking care of overflow handling. | 1394 // Computes the sum of two string lengths, taking care of overflow handling. |
| 1405 HValue* BuildAddStringLengths(HValue* left_length, HValue* right_length); | 1395 HValue* BuildAddStringLengths(HValue* left_length, HValue* right_length); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 HAllocationMode allocation_mode, | 1458 HAllocationMode allocation_mode, |
| 1469 BailoutId opt_id = BailoutId::None()); | 1459 BailoutId opt_id = BailoutId::None()); |
| 1470 | 1460 |
| 1471 HLoadNamedField* AddLoadFixedArrayLength(HValue *object, | 1461 HLoadNamedField* AddLoadFixedArrayLength(HValue *object, |
| 1472 HValue *dependency = NULL); | 1462 HValue *dependency = NULL); |
| 1473 | 1463 |
| 1474 HLoadNamedField* AddLoadArrayLength(HValue *object, | 1464 HLoadNamedField* AddLoadArrayLength(HValue *object, |
| 1475 ElementsKind kind, | 1465 ElementsKind kind, |
| 1476 HValue *dependency = NULL); | 1466 HValue *dependency = NULL); |
| 1477 | 1467 |
| 1478 HValue* AddLoadJSBuiltin(int context_index); | |
| 1479 | |
| 1480 HValue* EnforceNumberType(HValue* number, AstType* expected); | 1468 HValue* EnforceNumberType(HValue* number, AstType* expected); |
| 1481 HValue* TruncateToNumber(HValue* value, AstType** expected); | 1469 HValue* TruncateToNumber(HValue* value, AstType** expected); |
| 1482 | 1470 |
| 1483 void FinishExitWithHardDeoptimization(DeoptimizeReason reason); | 1471 void FinishExitWithHardDeoptimization(DeoptimizeReason reason); |
| 1484 | 1472 |
| 1485 void AddIncrementCounter(StatsCounter* counter); | 1473 void AddIncrementCounter(StatsCounter* counter); |
| 1486 | 1474 |
| 1487 class IfBuilder final { | 1475 class IfBuilder final { |
| 1488 public: | 1476 public: |
| 1489 // If using this constructor, Initialize() must be called explicitly! | 1477 // If using this constructor, Initialize() must be called explicitly! |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1790 void BuildCopyProperties(HValue* from_properties, HValue* to_properties, | 1778 void BuildCopyProperties(HValue* from_properties, HValue* to_properties, |
| 1791 HValue* length, HValue* capacity); | 1779 HValue* length, HValue* capacity); |
| 1792 | 1780 |
| 1793 void BuildCopyElements(HValue* from_elements, | 1781 void BuildCopyElements(HValue* from_elements, |
| 1794 ElementsKind from_elements_kind, | 1782 ElementsKind from_elements_kind, |
| 1795 HValue* to_elements, | 1783 HValue* to_elements, |
| 1796 ElementsKind to_elements_kind, | 1784 ElementsKind to_elements_kind, |
| 1797 HValue* length, | 1785 HValue* length, |
| 1798 HValue* capacity); | 1786 HValue* capacity); |
| 1799 | 1787 |
| 1800 HValue* BuildElementIndexHash(HValue* index); | |
| 1801 | |
| 1802 void BuildCreateAllocationMemento(HValue* previous_object, | 1788 void BuildCreateAllocationMemento(HValue* previous_object, |
| 1803 HValue* previous_object_size, | 1789 HValue* previous_object_size, |
| 1804 HValue* payload); | 1790 HValue* payload); |
| 1805 | 1791 |
| 1806 HInstruction* BuildConstantMapCheck(Handle<JSObject> constant, | 1792 HInstruction* BuildConstantMapCheck(Handle<JSObject> constant, |
| 1807 bool ensure_no_elements = false); | 1793 bool ensure_no_elements = false); |
| 1808 HInstruction* BuildCheckPrototypeMaps(Handle<JSObject> prototype, | 1794 HInstruction* BuildCheckPrototypeMaps(Handle<JSObject> prototype, |
| 1809 Handle<JSObject> holder, | 1795 Handle<JSObject> holder, |
| 1810 bool ensure_no_elements = false); | 1796 bool ensure_no_elements = false); |
| 1811 | 1797 |
| 1812 HInstruction* BuildGetNativeContext(HValue* closure); | |
| 1813 HInstruction* BuildGetNativeContext(); | 1798 HInstruction* BuildGetNativeContext(); |
| 1814 | 1799 |
| 1815 // Builds a loop version if |depth| is specified or unrolls the loop to | |
| 1816 // |depth_value| iterations otherwise. | |
| 1817 HValue* BuildGetParentContext(HValue* depth, int depth_value); | |
| 1818 | |
| 1819 HInstruction* BuildGetArrayFunction(); | |
| 1820 HValue* BuildArrayBufferViewFieldAccessor(HValue* object, | 1800 HValue* BuildArrayBufferViewFieldAccessor(HValue* object, |
| 1821 HValue* checked_object, | 1801 HValue* checked_object, |
| 1822 FieldIndex index); | 1802 FieldIndex index); |
| 1823 | 1803 |
| 1824 | 1804 |
| 1825 protected: | 1805 protected: |
| 1826 void SetSourcePosition(int position) { | 1806 void SetSourcePosition(int position) { |
| 1827 if (position != kNoSourcePosition) { | 1807 if (position != kNoSourcePosition) { |
| 1828 position_.SetScriptOffset(position); | 1808 position_.SetScriptOffset(position); |
| 1829 } | 1809 } |
| (...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 } | 2987 } |
| 3008 | 2988 |
| 3009 private: | 2989 private: |
| 3010 HOptimizedGraphBuilder* builder_; | 2990 HOptimizedGraphBuilder* builder_; |
| 3011 }; | 2991 }; |
| 3012 | 2992 |
| 3013 } // namespace internal | 2993 } // namespace internal |
| 3014 } // namespace v8 | 2994 } // namespace v8 |
| 3015 | 2995 |
| 3016 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 2996 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
| OLD | NEW |