| 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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1389 HValue* elements, | 1389 HValue* elements, |
| 1390 ElementsKind kind, | 1390 ElementsKind kind, |
| 1391 HValue* length); | 1391 HValue* length); |
| 1392 | 1392 |
| 1393 void BuildTransitionElementsKind(HValue* object, | 1393 void BuildTransitionElementsKind(HValue* object, |
| 1394 HValue* map, | 1394 HValue* map, |
| 1395 ElementsKind from_kind, | 1395 ElementsKind from_kind, |
| 1396 ElementsKind to_kind, | 1396 ElementsKind to_kind, |
| 1397 bool is_jsarray); | 1397 bool is_jsarray); |
| 1398 | 1398 |
| 1399 HValue* BuildNumberToString(HValue* object, Type* type); | 1399 HValue* BuildNumberToString(HValue* object, AstType* type); |
| 1400 HValue* BuildToNumber(HValue* input); | 1400 HValue* BuildToNumber(HValue* input); |
| 1401 HValue* BuildToObject(HValue* receiver); | 1401 HValue* BuildToObject(HValue* receiver); |
| 1402 | 1402 |
| 1403 void BuildJSObjectCheck(HValue* receiver, | 1403 void BuildJSObjectCheck(HValue* receiver, |
| 1404 int bit_field_mask); | 1404 int bit_field_mask); |
| 1405 | 1405 |
| 1406 // Checks a key value that's being used for a keyed element access context. If | 1406 // Checks a key value that's being used for a keyed element access context. If |
| 1407 // the key is a index, i.e. a smi or a number in a unique string with a cached | 1407 // the key is a index, i.e. a smi or a number in a unique string with a cached |
| 1408 // numeric value, the "true" of the continuation is joined. Otherwise, | 1408 // numeric value, the "true" of the continuation is joined. Otherwise, |
| 1409 // if the key is a name or a unique string, the "false" of the continuation is | 1409 // if the key is a name or a unique string, the "false" of the continuation is |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 HValue* dependency = NULL); | 1493 HValue* dependency = NULL); |
| 1494 HLoadNamedField* AddLoadElements(HValue* object, | 1494 HLoadNamedField* AddLoadElements(HValue* object, |
| 1495 HValue* dependency = NULL); | 1495 HValue* dependency = NULL); |
| 1496 | 1496 |
| 1497 bool MatchRotateRight(HValue* left, | 1497 bool MatchRotateRight(HValue* left, |
| 1498 HValue* right, | 1498 HValue* right, |
| 1499 HValue** operand, | 1499 HValue** operand, |
| 1500 HValue** shift_amount); | 1500 HValue** shift_amount); |
| 1501 | 1501 |
| 1502 HValue* BuildBinaryOperation(Token::Value op, HValue* left, HValue* right, | 1502 HValue* BuildBinaryOperation(Token::Value op, HValue* left, HValue* right, |
| 1503 Type* left_type, Type* right_type, | 1503 AstType* left_type, AstType* right_type, |
| 1504 Type* result_type, Maybe<int> fixed_right_arg, | 1504 AstType* result_type, Maybe<int> fixed_right_arg, |
| 1505 HAllocationMode allocation_mode, | 1505 HAllocationMode allocation_mode, |
| 1506 BailoutId opt_id = BailoutId::None()); | 1506 BailoutId opt_id = BailoutId::None()); |
| 1507 | 1507 |
| 1508 HLoadNamedField* AddLoadFixedArrayLength(HValue *object, | 1508 HLoadNamedField* AddLoadFixedArrayLength(HValue *object, |
| 1509 HValue *dependency = NULL); | 1509 HValue *dependency = NULL); |
| 1510 | 1510 |
| 1511 HLoadNamedField* AddLoadArrayLength(HValue *object, | 1511 HLoadNamedField* AddLoadArrayLength(HValue *object, |
| 1512 ElementsKind kind, | 1512 ElementsKind kind, |
| 1513 HValue *dependency = NULL); | 1513 HValue *dependency = NULL); |
| 1514 | 1514 |
| 1515 HValue* AddLoadJSBuiltin(int context_index); | 1515 HValue* AddLoadJSBuiltin(int context_index); |
| 1516 | 1516 |
| 1517 HValue* EnforceNumberType(HValue* number, Type* expected); | 1517 HValue* EnforceNumberType(HValue* number, AstType* expected); |
| 1518 HValue* TruncateToNumber(HValue* value, Type** expected); | 1518 HValue* TruncateToNumber(HValue* value, AstType** expected); |
| 1519 | 1519 |
| 1520 void FinishExitWithHardDeoptimization(DeoptimizeReason reason); | 1520 void FinishExitWithHardDeoptimization(DeoptimizeReason reason); |
| 1521 | 1521 |
| 1522 void AddIncrementCounter(StatsCounter* counter); | 1522 void AddIncrementCounter(StatsCounter* counter); |
| 1523 | 1523 |
| 1524 class IfBuilder final { | 1524 class IfBuilder final { |
| 1525 public: | 1525 public: |
| 1526 // If using this constructor, Initialize() must be called explicitly! | 1526 // If using this constructor, Initialize() must be called explicitly! |
| 1527 IfBuilder(); | 1527 IfBuilder(); |
| 1528 | 1528 |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2700 void HandleLiteralCompareNil(CompareOperation* expr, | 2700 void HandleLiteralCompareNil(CompareOperation* expr, |
| 2701 Expression* sub_expr, | 2701 Expression* sub_expr, |
| 2702 NilValue nil); | 2702 NilValue nil); |
| 2703 | 2703 |
| 2704 enum PushBeforeSimulateBehavior { | 2704 enum PushBeforeSimulateBehavior { |
| 2705 PUSH_BEFORE_SIMULATE, | 2705 PUSH_BEFORE_SIMULATE, |
| 2706 NO_PUSH_BEFORE_SIMULATE | 2706 NO_PUSH_BEFORE_SIMULATE |
| 2707 }; | 2707 }; |
| 2708 | 2708 |
| 2709 HControlInstruction* BuildCompareInstruction( | 2709 HControlInstruction* BuildCompareInstruction( |
| 2710 Token::Value op, HValue* left, HValue* right, Type* left_type, | 2710 Token::Value op, HValue* left, HValue* right, AstType* left_type, |
| 2711 Type* right_type, Type* combined_type, SourcePosition left_position, | 2711 AstType* right_type, AstType* combined_type, SourcePosition left_position, |
| 2712 SourcePosition right_position, PushBeforeSimulateBehavior push_sim_result, | 2712 SourcePosition right_position, PushBeforeSimulateBehavior push_sim_result, |
| 2713 BailoutId bailout_id); | 2713 BailoutId bailout_id); |
| 2714 | 2714 |
| 2715 HInstruction* BuildStringCharCodeAt(HValue* string, | 2715 HInstruction* BuildStringCharCodeAt(HValue* string, |
| 2716 HValue* index); | 2716 HValue* index); |
| 2717 | 2717 |
| 2718 HValue* BuildBinaryOperation( | 2718 HValue* BuildBinaryOperation( |
| 2719 BinaryOperation* expr, | 2719 BinaryOperation* expr, |
| 2720 HValue* left, | 2720 HValue* left, |
| 2721 HValue* right, | 2721 HValue* right, |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3041 } | 3041 } |
| 3042 | 3042 |
| 3043 private: | 3043 private: |
| 3044 HOptimizedGraphBuilder* builder_; | 3044 HOptimizedGraphBuilder* builder_; |
| 3045 }; | 3045 }; |
| 3046 | 3046 |
| 3047 } // namespace internal | 3047 } // namespace internal |
| 3048 } // namespace v8 | 3048 } // namespace v8 |
| 3049 | 3049 |
| 3050 #endif // V8_CRANKSHAFT_HYDROGEN_H_ | 3050 #endif // V8_CRANKSHAFT_HYDROGEN_H_ |
| OLD | NEW |