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

Side by Side Diff: src/parser.h

Issue 1130623004: [destructuring] Implement basic binding destructuring infrastructure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Patch for landing Created 5 years, 7 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
« no previous file with comments | « BUILD.gn ('k') | src/parser.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 bool Parse(ParseInfo* info); 862 bool Parse(ParseInfo* info);
863 void ParseOnBackground(ParseInfo* info); 863 void ParseOnBackground(ParseInfo* info);
864 864
865 // Handle errors detected during parsing, move statistics to Isolate, 865 // Handle errors detected during parsing, move statistics to Isolate,
866 // internalize strings (move them to the heap). 866 // internalize strings (move them to the heap).
867 void Internalize(Isolate* isolate, Handle<Script> script, bool error); 867 void Internalize(Isolate* isolate, Handle<Script> script, bool error);
868 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script); 868 void HandleSourceURLComments(Isolate* isolate, Handle<Script> script);
869 869
870 private: 870 private:
871 friend class ParserTraits; 871 friend class ParserTraits;
872 class PatternRewriter;
872 873
873 // Limit the allowed number of local variables in a function. The hard limit 874 // Limit the allowed number of local variables in a function. The hard limit
874 // is that offsets computed by FullCodeGenerator::StackOperand and similar 875 // is that offsets computed by FullCodeGenerator::StackOperand and similar
875 // functions are ints, and they should not overflow. In addition, accessing 876 // functions are ints, and they should not overflow. In addition, accessing
876 // local variables creates user-controlled constants in the generated code, 877 // local variables creates user-controlled constants in the generated code,
877 // and we don't want too much user-controlled memory inside the code (this was 878 // and we don't want too much user-controlled memory inside the code (this was
878 // the reason why this limit was introduced in the first place; see 879 // the reason why this limit was introduced in the first place; see
879 // https://codereview.chromium.org/7003030/ ). 880 // https://codereview.chromium.org/7003030/ ).
880 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1 881 static const int kMaxNumFunctionLocals = 4194303; // 2^22-1
881 882
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 } 1179 }
1179 1180
1180 1181
1181 Expression* ParserTraits::SpreadCallNew( 1182 Expression* ParserTraits::SpreadCallNew(
1182 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { 1183 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) {
1183 return parser_->SpreadCallNew(function, args, pos); 1184 return parser_->SpreadCallNew(function, args, pos);
1184 } 1185 }
1185 } } // namespace v8::internal 1186 } } // namespace v8::internal
1186 1187
1187 #endif // V8_PARSER_H_ 1188 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698