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

Side by Side Diff: src/ast.cc

Issue 22796020: Reland "Use V8_FINAL and V8_OVERRIDE in various places, fixing bugs revealed by them.". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 months 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 | « src/ast.h ('k') | src/hydrogen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 bool RegExpCapture::IsAnchoredAtEnd() { 851 bool RegExpCapture::IsAnchoredAtEnd() {
852 return body()->IsAnchoredAtEnd(); 852 return body()->IsAnchoredAtEnd();
853 } 853 }
854 854
855 855
856 // Convert regular expression trees to a simple sexp representation. 856 // Convert regular expression trees to a simple sexp representation.
857 // This representation should be different from the input grammar 857 // This representation should be different from the input grammar
858 // in as many cases as possible, to make it more difficult for incorrect 858 // in as many cases as possible, to make it more difficult for incorrect
859 // parses to look as correct ones which is likely if the input and 859 // parses to look as correct ones which is likely if the input and
860 // output formats are alike. 860 // output formats are alike.
861 class RegExpUnparser: public RegExpVisitor { 861 class RegExpUnparser V8_FINAL : public RegExpVisitor {
862 public: 862 public:
863 explicit RegExpUnparser(Zone* zone); 863 explicit RegExpUnparser(Zone* zone);
864 void VisitCharacterRange(CharacterRange that); 864 void VisitCharacterRange(CharacterRange that);
865 SmartArrayPointer<const char> ToString() { return stream_.ToCString(); } 865 SmartArrayPointer<const char> ToString() { return stream_.ToCString(); }
866 #define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, void* data); 866 #define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, \
867 void* data) V8_OVERRIDE;
867 FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE) 868 FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
868 #undef MAKE_CASE 869 #undef MAKE_CASE
869 private: 870 private:
870 StringStream* stream() { return &stream_; } 871 StringStream* stream() { return &stream_; }
871 HeapStringAllocator alloc_; 872 HeapStringAllocator alloc_;
872 StringStream stream_; 873 StringStream stream_;
873 Zone* zone_; 874 Zone* zone_;
874 }; 875 };
875 876
876 877
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1191 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1191 str = arr; 1192 str = arr;
1192 } else { 1193 } else {
1193 str = DoubleToCString(value_->Number(), buffer); 1194 str = DoubleToCString(value_->Number(), buffer);
1194 } 1195 }
1195 return factory->NewStringFromAscii(CStrVector(str)); 1196 return factory->NewStringFromAscii(CStrVector(str));
1196 } 1197 }
1197 1198
1198 1199
1199 } } // namespace v8::internal 1200 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698