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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 int GetNextBlockID() { return next_block_id_++; } | 360 int GetNextBlockID() { return next_block_id_++; } |
361 int GetNextValueID(HValue* value) { | 361 int GetNextValueID(HValue* value) { |
362 values_.Add(value, zone()); | 362 values_.Add(value, zone()); |
363 return values_.length() - 1; | 363 return values_.length() - 1; |
364 } | 364 } |
365 HValue* LookupValue(int id) const { | 365 HValue* LookupValue(int id) const { |
366 if (id >= 0 && id < values_.length()) return values_[id]; | 366 if (id >= 0 && id < values_.length()) return values_[id]; |
367 return NULL; | 367 return NULL; |
368 } | 368 } |
369 | 369 |
370 bool Optimize(BailoutReason* bailout_reason); | 370 bool Optimize(SmartArrayPointer<char>* bailout_reason); |
371 | 371 |
372 #ifdef DEBUG | 372 #ifdef DEBUG |
373 void Verify(bool do_full_verify) const; | 373 void Verify(bool do_full_verify) const; |
374 #endif | 374 #endif |
375 | 375 |
376 bool has_osr() { | 376 bool has_osr() { |
377 return osr_ != NULL; | 377 return osr_ != NULL; |
378 } | 378 } |
379 | 379 |
380 void set_osr(HOsrBuilder* osr) { | 380 void set_osr(HOsrBuilder* osr) { |
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 ElementsKind to_elements_kind, | 1543 ElementsKind to_elements_kind, |
1544 HValue* length, | 1544 HValue* length, |
1545 HValue* capacity); | 1545 HValue* capacity); |
1546 | 1546 |
1547 HValue* BuildCloneShallowArray(HValue* boilerplate, | 1547 HValue* BuildCloneShallowArray(HValue* boilerplate, |
1548 HValue* allocation_site, | 1548 HValue* allocation_site, |
1549 AllocationSiteMode mode, | 1549 AllocationSiteMode mode, |
1550 ElementsKind kind, | 1550 ElementsKind kind, |
1551 int length); | 1551 int length); |
1552 | 1552 |
| 1553 HInstruction* BuildUnaryMathOp( |
| 1554 HValue* value, Handle<Type> type, Token::Value token); |
| 1555 |
1553 void BuildCompareNil( | 1556 void BuildCompareNil( |
1554 HValue* value, | 1557 HValue* value, |
1555 Handle<Type> type, | 1558 Handle<Type> type, |
1556 int position, | 1559 int position, |
1557 HIfContinuation* continuation); | 1560 HIfContinuation* continuation); |
1558 | 1561 |
1559 HValue* BuildCreateAllocationMemento(HValue* previous_object, | 1562 HValue* BuildCreateAllocationMemento(HValue* previous_object, |
1560 int previous_object_size, | 1563 int previous_object_size, |
1561 HValue* payload); | 1564 HValue* payload); |
1562 | 1565 |
1563 void BuildConstantMapCheck(Handle<JSObject> constant, CompilationInfo* info); | |
1564 void BuildCheckPrototypeMaps(Handle<JSObject> prototype, | |
1565 Handle<JSObject> holder); | |
1566 | |
1567 HInstruction* BuildGetNativeContext(); | 1566 HInstruction* BuildGetNativeContext(); |
1568 HInstruction* BuildGetArrayFunction(); | 1567 HInstruction* BuildGetArrayFunction(); |
1569 | 1568 |
1570 private: | 1569 private: |
1571 HGraphBuilder(); | 1570 HGraphBuilder(); |
1572 | 1571 |
1573 void PadEnvironmentForContinuation(HBasicBlock* from, | 1572 void PadEnvironmentForContinuation(HBasicBlock* from, |
1574 HBasicBlock* continuation); | 1573 HBasicBlock* continuation); |
1575 | 1574 |
1576 CompilationInfo* info_; | 1575 CompilationInfo* info_; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 virtual bool BuildGraph(); | 1719 virtual bool BuildGraph(); |
1721 | 1720 |
1722 // Simple accessors. | 1721 // Simple accessors. |
1723 BreakAndContinueScope* break_scope() const { return break_scope_; } | 1722 BreakAndContinueScope* break_scope() const { return break_scope_; } |
1724 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } | 1723 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } |
1725 | 1724 |
1726 bool inline_bailout() { return inline_bailout_; } | 1725 bool inline_bailout() { return inline_bailout_; } |
1727 | 1726 |
1728 HValue* context() { return environment()->context(); } | 1727 HValue* context() { return environment()->context(); } |
1729 | 1728 |
1730 void Bailout(BailoutReason reason); | 1729 void Bailout(const char* reason); |
1731 | 1730 |
1732 HBasicBlock* CreateJoin(HBasicBlock* first, | 1731 HBasicBlock* CreateJoin(HBasicBlock* first, |
1733 HBasicBlock* second, | 1732 HBasicBlock* second, |
1734 BailoutId join_id); | 1733 BailoutId join_id); |
1735 | 1734 |
1736 FunctionState* function_state() const { return function_state_; } | 1735 FunctionState* function_state() const { return function_state_; } |
1737 | 1736 |
1738 void VisitDeclarations(ZoneList<Declaration*>* declarations); | 1737 void VisitDeclarations(ZoneList<Declaration*>* declarations); |
1739 | 1738 |
1740 void* operator new(size_t size, Zone* zone) { | 1739 void* operator new(size_t size, Zone* zone) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 #define INLINE_FUNCTION_GENERATOR_DECLARATION(Name, argc, ressize) \ | 1800 #define INLINE_FUNCTION_GENERATOR_DECLARATION(Name, argc, ressize) \ |
1802 void Generate##Name(CallRuntime* call); | 1801 void Generate##Name(CallRuntime* call); |
1803 | 1802 |
1804 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION) | 1803 INLINE_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION) |
1805 INLINE_RUNTIME_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION) | 1804 INLINE_RUNTIME_FUNCTION_LIST(INLINE_FUNCTION_GENERATOR_DECLARATION) |
1806 #undef INLINE_FUNCTION_GENERATOR_DECLARATION | 1805 #undef INLINE_FUNCTION_GENERATOR_DECLARATION |
1807 | 1806 |
1808 void VisitDelete(UnaryOperation* expr); | 1807 void VisitDelete(UnaryOperation* expr); |
1809 void VisitVoid(UnaryOperation* expr); | 1808 void VisitVoid(UnaryOperation* expr); |
1810 void VisitTypeof(UnaryOperation* expr); | 1809 void VisitTypeof(UnaryOperation* expr); |
| 1810 void VisitSub(UnaryOperation* expr); |
| 1811 void VisitBitNot(UnaryOperation* expr); |
1811 void VisitNot(UnaryOperation* expr); | 1812 void VisitNot(UnaryOperation* expr); |
1812 | 1813 |
1813 void VisitComma(BinaryOperation* expr); | 1814 void VisitComma(BinaryOperation* expr); |
1814 void VisitLogicalExpression(BinaryOperation* expr); | 1815 void VisitLogicalExpression(BinaryOperation* expr); |
1815 void VisitArithmeticExpression(BinaryOperation* expr); | 1816 void VisitArithmeticExpression(BinaryOperation* expr); |
1816 | 1817 |
1817 bool PreProcessOsrEntry(IterationStatement* statement); | 1818 bool PreProcessOsrEntry(IterationStatement* statement); |
1818 void VisitLoopBody(IterationStatement* stmt, | 1819 void VisitLoopBody(IterationStatement* stmt, |
1819 HBasicBlock* loop_entry, | 1820 HBasicBlock* loop_entry, |
1820 BreakAndContinueInfo* break_info); | 1821 BreakAndContinueInfo* break_info); |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2325 EmbeddedVector<char, 64> filename_; | 2326 EmbeddedVector<char, 64> filename_; |
2326 HeapStringAllocator string_allocator_; | 2327 HeapStringAllocator string_allocator_; |
2327 StringStream trace_; | 2328 StringStream trace_; |
2328 int indent_; | 2329 int indent_; |
2329 }; | 2330 }; |
2330 | 2331 |
2331 | 2332 |
2332 } } // namespace v8::internal | 2333 } } // namespace v8::internal |
2333 | 2334 |
2334 #endif // V8_HYDROGEN_H_ | 2335 #endif // V8_HYDROGEN_H_ |
OLD | NEW |