| 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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 ElementsKind kind, | 1016 ElementsKind kind, |
| 1016 HValue* capacity); | 1017 HValue* capacity); |
| 1017 | 1018 |
| 1018 void BuildCopyElements(HContext* context, | 1019 void BuildCopyElements(HContext* context, |
| 1019 HValue* from_elements, | 1020 HValue* from_elements, |
| 1020 ElementsKind from_elements_kind, | 1021 ElementsKind from_elements_kind, |
| 1021 HValue* to_elements, | 1022 HValue* to_elements, |
| 1022 ElementsKind to_elements_kind, | 1023 ElementsKind to_elements_kind, |
| 1023 HValue* length); | 1024 HValue* length); |
| 1024 | 1025 |
| 1026 bool IsOneTimeCode() { |
| 1027 return info_->scope()->is_global_scope() && |
| 1028 current_block()->LoopNestingDepth() == 0; |
| 1029 } |
| 1030 |
| 1025 private: | 1031 private: |
| 1026 HGraphBuilder(); | 1032 HGraphBuilder(); |
| 1027 CompilationInfo* info_; | 1033 CompilationInfo* info_; |
| 1028 HGraph* graph_; | 1034 HGraph* graph_; |
| 1029 HBasicBlock* current_block_; | 1035 HBasicBlock* current_block_; |
| 1030 }; | 1036 }; |
| 1031 | 1037 |
| 1032 | 1038 |
| 1033 class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { | 1039 class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { |
| 1034 public: | 1040 public: |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 EmbeddedVector<char, 64> filename_; | 1685 EmbeddedVector<char, 64> filename_; |
| 1680 HeapStringAllocator string_allocator_; | 1686 HeapStringAllocator string_allocator_; |
| 1681 StringStream trace_; | 1687 StringStream trace_; |
| 1682 int indent_; | 1688 int indent_; |
| 1683 }; | 1689 }; |
| 1684 | 1690 |
| 1685 | 1691 |
| 1686 } } // namespace v8::internal | 1692 } } // namespace v8::internal |
| 1687 | 1693 |
| 1688 #endif // V8_HYDROGEN_H_ | 1694 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |