Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: src/ast.h

Issue 8586025: Removing exit time destructors by leaking static members. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Macro-fied the elements accessor list. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/elements.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 class RegExpEmpty: public RegExpTree { 2116 class RegExpEmpty: public RegExpTree {
2117 public: 2117 public:
2118 RegExpEmpty() { } 2118 RegExpEmpty() { }
2119 virtual void* Accept(RegExpVisitor* visitor, void* data); 2119 virtual void* Accept(RegExpVisitor* visitor, void* data);
2120 virtual RegExpNode* ToNode(RegExpCompiler* compiler, 2120 virtual RegExpNode* ToNode(RegExpCompiler* compiler,
2121 RegExpNode* on_success); 2121 RegExpNode* on_success);
2122 virtual RegExpEmpty* AsEmpty(); 2122 virtual RegExpEmpty* AsEmpty();
2123 virtual bool IsEmpty(); 2123 virtual bool IsEmpty();
2124 virtual int min_match() { return 0; } 2124 virtual int min_match() { return 0; }
2125 virtual int max_match() { return 0; } 2125 virtual int max_match() { return 0; }
2126 static RegExpEmpty* GetInstance() { return &kInstance; } 2126 static RegExpEmpty* GetInstance() {
2127 private: 2127 static RegExpEmpty* instance = ::new RegExpEmpty();
2128 static RegExpEmpty kInstance; 2128 return instance;
2129 }
2129 }; 2130 };
2130 2131
2131 2132
2132 // ---------------------------------------------------------------------------- 2133 // ----------------------------------------------------------------------------
2133 // Basic visitor 2134 // Basic visitor
2134 // - leaf node visitors are abstract. 2135 // - leaf node visitors are abstract.
2135 2136
2136 class AstVisitor BASE_EMBEDDED { 2137 class AstVisitor BASE_EMBEDDED {
2137 public: 2138 public:
2138 AstVisitor() : isolate_(Isolate::Current()), stack_overflow_(false) { } 2139 AstVisitor() : isolate_(Isolate::Current()), stack_overflow_(false) { }
(...skipping 28 matching lines...) Expand all
2167 2168
2168 private: 2169 private:
2169 Isolate* isolate_; 2170 Isolate* isolate_;
2170 bool stack_overflow_; 2171 bool stack_overflow_;
2171 }; 2172 };
2172 2173
2173 2174
2174 } } // namespace v8::internal 2175 } } // namespace v8::internal
2175 2176
2176 #endif // V8_AST_H_ 2177 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/elements.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698