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

Side by Side Diff: src/parser.h

Issue 220473014: Make stray 'return' an early error (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/messages.js ('k') | src/parser.cc » ('j') | src/runtime.cc » ('J')
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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 Expression* NewThrowReferenceError(const char* type, int pos); 531 Expression* NewThrowReferenceError(const char* type, int pos);
532 532
533 // Generate AST node that throws a SyntaxError with the given 533 // Generate AST node that throws a SyntaxError with the given
534 // type. The first argument may be null (in the handle sense) in 534 // type. The first argument may be null (in the handle sense) in
535 // which case no arguments are passed to the constructor. 535 // which case no arguments are passed to the constructor.
536 Expression* NewThrowSyntaxError( 536 Expression* NewThrowSyntaxError(
537 const char* type, Handle<Object> arg, int pos); 537 const char* type, Handle<Object> arg, int pos);
538 538
539 // Generate AST node that throws a TypeError with the given 539 // Generate AST node that throws a TypeError with the given
540 // type. Both arguments must be non-null (in the handle sense). 540 // type. Both arguments must be non-null (in the handle sense).
541 Expression* NewThrowTypeError( 541 Expression* NewThrowTypeError(const char* type, Handle<Object> arg, int pos);
542 const char* type, Handle<Object> arg1, Handle<Object> arg2, int pos);
543 542
544 // Generic AST generator for throwing errors from compiled code. 543 // Generic AST generator for throwing errors from compiled code.
545 Expression* NewThrowError( 544 Expression* NewThrowError(
546 Handle<String> constructor, const char* type, 545 Handle<String> constructor, const char* type,
547 Vector<Handle<Object> > arguments, int pos); 546 Vector<Handle<Object> > arguments, int pos);
548 547
549 // Reporting errors. 548 // Reporting errors.
550 void ReportMessageAt(Scanner::Location source_location, 549 void ReportMessageAt(Scanner::Location source_location,
551 const char* message, 550 const char* message,
552 Vector<const char*> args, 551 Vector<const char*> args,
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 private: 838 private:
840 static const int kLiteralTypeSlot = 0; 839 static const int kLiteralTypeSlot = 0;
841 static const int kElementsSlot = 1; 840 static const int kElementsSlot = 1;
842 841
843 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 842 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
844 }; 843 };
845 844
846 } } // namespace v8::internal 845 } } // namespace v8::internal
847 846
848 #endif // V8_PARSER_H_ 847 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698