| 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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 HObjectAccess access, | 1122 HObjectAccess access, |
| 1123 HValue *val, | 1123 HValue *val, |
| 1124 Representation representation = Representation::Tagged()); | 1124 Representation representation = Representation::Tagged()); |
| 1125 | 1125 |
| 1126 HStoreNamedField* AddStoreMapConstant(HValue *object, Handle<Map>); | 1126 HStoreNamedField* AddStoreMapConstant(HValue *object, Handle<Map>); |
| 1127 | 1127 |
| 1128 HLoadNamedField* AddLoadElements(HValue *object, HValue *typecheck = NULL); | 1128 HLoadNamedField* AddLoadElements(HValue *object, HValue *typecheck = NULL); |
| 1129 | 1129 |
| 1130 HLoadNamedField* AddLoadFixedArrayLength(HValue *object); | 1130 HLoadNamedField* AddLoadFixedArrayLength(HValue *object); |
| 1131 | 1131 |
| 1132 HValue* AddLoadJSBuiltin(Builtins::JavaScript builtin, HContext* context); |
| 1133 |
| 1134 void AddSoftDeoptimize(); |
| 1135 |
| 1132 class IfBuilder { | 1136 class IfBuilder { |
| 1133 public: | 1137 public: |
| 1134 explicit IfBuilder(HGraphBuilder* builder, | 1138 explicit IfBuilder(HGraphBuilder* builder, |
| 1135 int position = RelocInfo::kNoPosition); | 1139 int position = RelocInfo::kNoPosition); |
| 1136 IfBuilder(HGraphBuilder* builder, | 1140 IfBuilder(HGraphBuilder* builder, |
| 1137 HIfContinuation* continuation); | 1141 HIfContinuation* continuation); |
| 1138 | 1142 |
| 1139 ~IfBuilder() { | 1143 ~IfBuilder() { |
| 1140 if (!finished_) End(); | 1144 if (!finished_) End(); |
| 1141 } | 1145 } |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 ElementsKind to_elements_kind, | 1406 ElementsKind to_elements_kind, |
| 1403 HValue* length, | 1407 HValue* length, |
| 1404 HValue* capacity); | 1408 HValue* capacity); |
| 1405 | 1409 |
| 1406 HValue* BuildCloneShallowArray(HContext* context, | 1410 HValue* BuildCloneShallowArray(HContext* context, |
| 1407 HValue* boilerplate, | 1411 HValue* boilerplate, |
| 1408 AllocationSiteMode mode, | 1412 AllocationSiteMode mode, |
| 1409 ElementsKind kind, | 1413 ElementsKind kind, |
| 1410 int length); | 1414 int length); |
| 1411 | 1415 |
| 1416 HInstruction* BuildUnaryMathOp( |
| 1417 HValue* value, Handle<Type> type, Token::Value token); |
| 1418 |
| 1412 void BuildCompareNil( | 1419 void BuildCompareNil( |
| 1413 HValue* value, | 1420 HValue* value, |
| 1414 Handle<Type> type, | 1421 Handle<Type> type, |
| 1415 int position, | 1422 int position, |
| 1416 HIfContinuation* continuation); | 1423 HIfContinuation* continuation); |
| 1417 | 1424 |
| 1418 HValue* BuildCreateAllocationSiteInfo(HValue* previous_object, | 1425 HValue* BuildCreateAllocationSiteInfo(HValue* previous_object, |
| 1419 int previous_object_size, | 1426 int previous_object_size, |
| 1420 HValue* payload); | 1427 HValue* payload); |
| 1421 | 1428 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 explicit HOptimizedGraphBuilder(CompilationInfo* info); | 1495 explicit HOptimizedGraphBuilder(CompilationInfo* info); |
| 1489 | 1496 |
| 1490 virtual bool BuildGraph(); | 1497 virtual bool BuildGraph(); |
| 1491 | 1498 |
| 1492 // Simple accessors. | 1499 // Simple accessors. |
| 1493 BreakAndContinueScope* break_scope() const { return break_scope_; } | 1500 BreakAndContinueScope* break_scope() const { return break_scope_; } |
| 1494 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } | 1501 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } |
| 1495 | 1502 |
| 1496 bool inline_bailout() { return inline_bailout_; } | 1503 bool inline_bailout() { return inline_bailout_; } |
| 1497 | 1504 |
| 1498 void AddSoftDeoptimize(); | |
| 1499 | |
| 1500 void Bailout(const char* reason); | 1505 void Bailout(const char* reason); |
| 1501 | 1506 |
| 1502 HBasicBlock* CreateJoin(HBasicBlock* first, | 1507 HBasicBlock* CreateJoin(HBasicBlock* first, |
| 1503 HBasicBlock* second, | 1508 HBasicBlock* second, |
| 1504 BailoutId join_id); | 1509 BailoutId join_id); |
| 1505 | 1510 |
| 1506 FunctionState* function_state() const { return function_state_; } | 1511 FunctionState* function_state() const { return function_state_; } |
| 1507 | 1512 |
| 1508 void VisitDeclarations(ZoneList<Declaration*>* declarations); | 1513 void VisitDeclarations(ZoneList<Declaration*>* declarations); |
| 1509 | 1514 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1669 | 1674 |
| 1670 // Visit a list of expressions from left to right, each in a value context. | 1675 // Visit a list of expressions from left to right, each in a value context. |
| 1671 void VisitExpressions(ZoneList<Expression*>* exprs); | 1676 void VisitExpressions(ZoneList<Expression*>* exprs); |
| 1672 | 1677 |
| 1673 void PushAndAdd(HInstruction* instr); | 1678 void PushAndAdd(HInstruction* instr); |
| 1674 | 1679 |
| 1675 // Remove the arguments from the bailout environment and emit instructions | 1680 // Remove the arguments from the bailout environment and emit instructions |
| 1676 // to push them as outgoing parameters. | 1681 // to push them as outgoing parameters. |
| 1677 template <class Instruction> HInstruction* PreProcessCall(Instruction* call); | 1682 template <class Instruction> HInstruction* PreProcessCall(Instruction* call); |
| 1678 | 1683 |
| 1679 static Representation ToRepresentation(TypeInfo info); | |
| 1680 static Representation ToRepresentation(Handle<Type> type); | |
| 1681 | |
| 1682 void SetUpScope(Scope* scope); | 1684 void SetUpScope(Scope* scope); |
| 1683 virtual void VisitStatements(ZoneList<Statement*>* statements); | 1685 virtual void VisitStatements(ZoneList<Statement*>* statements); |
| 1684 | 1686 |
| 1685 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 1687 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
| 1686 AST_NODE_LIST(DECLARE_VISIT) | 1688 AST_NODE_LIST(DECLARE_VISIT) |
| 1687 #undef DECLARE_VISIT | 1689 #undef DECLARE_VISIT |
| 1688 | 1690 |
| 1689 // Helpers for flow graph construction. | 1691 // Helpers for flow graph construction. |
| 1690 enum GlobalPropertyAccess { | 1692 enum GlobalPropertyAccess { |
| 1691 kUseCell, | 1693 kUseCell, |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2099 EmbeddedVector<char, 64> filename_; | 2101 EmbeddedVector<char, 64> filename_; |
| 2100 HeapStringAllocator string_allocator_; | 2102 HeapStringAllocator string_allocator_; |
| 2101 StringStream trace_; | 2103 StringStream trace_; |
| 2102 int indent_; | 2104 int indent_; |
| 2103 }; | 2105 }; |
| 2104 | 2106 |
| 2105 | 2107 |
| 2106 } } // namespace v8::internal | 2108 } } // namespace v8::internal |
| 2107 | 2109 |
| 2108 #endif // V8_HYDROGEN_H_ | 2110 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |