| 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 18 matching lines...) Expand all Loading... |
| 29 #define V8_HYDROGEN_H_ | 29 #define V8_HYDROGEN_H_ |
| 30 | 30 |
| 31 #include "v8.h" | 31 #include "v8.h" |
| 32 | 32 |
| 33 #include "allocation.h" | 33 #include "allocation.h" |
| 34 #include "ast.h" | 34 #include "ast.h" |
| 35 #include "compiler.h" | 35 #include "compiler.h" |
| 36 #include "hydrogen-instructions.h" | 36 #include "hydrogen-instructions.h" |
| 37 #include "type-info.h" | 37 #include "type-info.h" |
| 38 #include "zone.h" | 38 #include "zone.h" |
| 39 #include "scopes.h" |
| 39 | 40 |
| 40 namespace v8 { | 41 namespace v8 { |
| 41 namespace internal { | 42 namespace internal { |
| 42 | 43 |
| 43 // Forward declarations. | 44 // Forward declarations. |
| 44 class BitVector; | 45 class BitVector; |
| 45 class FunctionState; | 46 class FunctionState; |
| 46 class HEnvironment; | 47 class HEnvironment; |
| 47 class HGraph; | 48 class HGraph; |
| 48 class HLoopInformation; | 49 class HLoopInformation; |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 ElementsKind kind, | 975 ElementsKind kind, |
| 975 HValue* capacity); | 976 HValue* capacity); |
| 976 | 977 |
| 977 void BuildCopyElements(HContext* context, | 978 void BuildCopyElements(HContext* context, |
| 978 HValue* from_elements, | 979 HValue* from_elements, |
| 979 ElementsKind from_elements_kind, | 980 ElementsKind from_elements_kind, |
| 980 HValue* to_elements, | 981 HValue* to_elements, |
| 981 ElementsKind to_elements_kind, | 982 ElementsKind to_elements_kind, |
| 982 HValue* length); | 983 HValue* length); |
| 983 | 984 |
| 985 bool IsOneTimeCode() { |
| 986 return info_->scope()->is_global_scope() && |
| 987 current_block()->LoopNestingDepth() == 0; |
| 988 } |
| 989 |
| 984 private: | 990 private: |
| 985 HGraphBuilder(); | 991 HGraphBuilder(); |
| 986 CompilationInfo* info_; | 992 CompilationInfo* info_; |
| 987 HGraph* graph_; | 993 HGraph* graph_; |
| 988 HBasicBlock* current_block_; | 994 HBasicBlock* current_block_; |
| 989 }; | 995 }; |
| 990 | 996 |
| 991 | 997 |
| 992 class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { | 998 class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { |
| 993 public: | 999 public: |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 const char* filename_; | 1660 const char* filename_; |
| 1655 HeapStringAllocator string_allocator_; | 1661 HeapStringAllocator string_allocator_; |
| 1656 StringStream trace_; | 1662 StringStream trace_; |
| 1657 int indent_; | 1663 int indent_; |
| 1658 }; | 1664 }; |
| 1659 | 1665 |
| 1660 | 1666 |
| 1661 } } // namespace v8::internal | 1667 } } // namespace v8::internal |
| 1662 | 1668 |
| 1663 #endif // V8_HYDROGEN_H_ | 1669 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |