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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Forward declarations. | 46 // Forward declarations. |
47 class JumpPatchSite; | 47 class JumpPatchSite; |
48 | 48 |
49 // AST node visitor which can tell whether a given statement will be breakable | 49 // AST node visitor which can tell whether a given statement will be breakable |
50 // when the code is compiled by the full compiler in the debugger. This means | 50 // when the code is compiled by the full compiler in the debugger. This means |
51 // that there will be an IC (load/store/call) in the code generated for the | 51 // that there will be an IC (load/store/call) in the code generated for the |
52 // debugger to piggybag on. | 52 // debugger to piggybag on. |
53 class BreakableStatementChecker: public AstVisitor { | 53 class BreakableStatementChecker: public AstVisitor { |
54 public: | 54 public: |
55 BreakableStatementChecker() : is_breakable_(false) { | 55 explicit BreakableStatementChecker(Isolate* isolate) : is_breakable_(false) { |
56 InitializeAstVisitor(); | 56 InitializeAstVisitor(isolate); |
57 } | 57 } |
58 | 58 |
59 void Check(Statement* stmt); | 59 void Check(Statement* stmt); |
60 void Check(Expression* stmt); | 60 void Check(Expression* stmt); |
61 | 61 |
62 bool is_breakable() { return is_breakable_; } | 62 bool is_breakable() { return is_breakable_; } |
63 | 63 |
64 private: | 64 private: |
65 // AST node visit functions. | 65 // AST node visit functions. |
66 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 66 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 } | 936 } |
937 | 937 |
938 private: | 938 private: |
939 Zone* zone_; | 939 Zone* zone_; |
940 }; | 940 }; |
941 | 941 |
942 | 942 |
943 } } // namespace v8::internal | 943 } } // namespace v8::internal |
944 | 944 |
945 #endif // V8_FULL_CODEGEN_H_ | 945 #endif // V8_FULL_CODEGEN_H_ |
OLD | NEW |