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

Side by Side Diff: src/parser.cc

Issue 159632: Change the overly-general class named Node to the more specific... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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/ia32/codegen-ia32.h ('k') | src/prettyprinter.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 1052
1053 1053
1054 // ---------------------------------------------------------------------------- 1054 // ----------------------------------------------------------------------------
1055 // Target is a support class to facilitate manipulation of the 1055 // Target is a support class to facilitate manipulation of the
1056 // Parser's target_stack_ (the stack of potential 'break' and 1056 // Parser's target_stack_ (the stack of potential 'break' and
1057 // 'continue' statement targets). Upon construction, a new target is 1057 // 'continue' statement targets). Upon construction, a new target is
1058 // added; it is removed upon destruction. 1058 // added; it is removed upon destruction.
1059 1059
1060 class Target BASE_EMBEDDED { 1060 class Target BASE_EMBEDDED {
1061 public: 1061 public:
1062 Target(Parser* parser, Node* node) 1062 Target(Parser* parser, AstNode* node)
1063 : parser_(parser), node_(node), previous_(parser_->target_stack_) { 1063 : parser_(parser), node_(node), previous_(parser_->target_stack_) {
1064 parser_->target_stack_ = this; 1064 parser_->target_stack_ = this;
1065 } 1065 }
1066 1066
1067 ~Target() { 1067 ~Target() {
1068 parser_->target_stack_ = previous_; 1068 parser_->target_stack_ = previous_;
1069 } 1069 }
1070 1070
1071 Target* previous() { return previous_; } 1071 Target* previous() { return previous_; }
1072 Node* node() { return node_; } 1072 AstNode* node() { return node_; }
1073 1073
1074 private: 1074 private:
1075 Parser* parser_; 1075 Parser* parser_;
1076 Node* node_; 1076 AstNode* node_;
1077 Target* previous_; 1077 Target* previous_;
1078 }; 1078 };
1079 1079
1080 1080
1081 class TargetScope BASE_EMBEDDED { 1081 class TargetScope BASE_EMBEDDED {
1082 public: 1082 public:
1083 explicit TargetScope(Parser* parser) 1083 explicit TargetScope(Parser* parser)
1084 : parser_(parser), previous_(parser->target_stack_) { 1084 : parser_(parser), previous_(parser->target_stack_) {
1085 parser->target_stack_ = NULL; 1085 parser->target_stack_ = NULL;
1086 } 1086 }
(...skipping 3592 matching lines...) Expand 10 before | Expand all | Expand 10 after
4679 start_position, 4679 start_position,
4680 is_expression); 4680 is_expression);
4681 return result; 4681 return result;
4682 } 4682 }
4683 4683
4684 4684
4685 #undef NEW 4685 #undef NEW
4686 4686
4687 4687
4688 } } // namespace v8::internal 4688 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.h ('k') | src/prettyprinter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698