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

Side by Side Diff: vm/ast.h

Issue 8363034: Report NullPointerException when we try to construct a regular expression (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_AST_H_ 5 #ifndef VM_AST_H_
6 #define VM_AST_H_ 6 #define VM_AST_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assert.h" 9 #include "vm/assert.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 LiteralNode(intptr_t token_index, const Instance& literal) 308 LiteralNode(intptr_t token_index, const Instance& literal)
309 : AstNode(token_index), literal_(literal) { 309 : AstNode(token_index), literal_(literal) {
310 ASSERT(literal.IsZoneHandle()); 310 ASSERT(literal.IsZoneHandle());
311 #if defined(DEBUG) 311 #if defined(DEBUG)
312 if (literal.IsString()) { 312 if (literal.IsString()) {
313 String& str = String::Handle(); 313 String& str = String::Handle();
314 str ^= literal.raw(); 314 str ^= literal.raw();
315 ASSERT(str.IsSymbol()); 315 ASSERT(str.IsSymbol());
316 } 316 }
317 #endif // defined(DEBUG) 317 #endif // defined(DEBUG)
318 ASSERT(literal.IsNull() || Class::Handle(literal.clazz()).is_finalized()); 318 ASSERT(literal.IsNull() ||
319 Class::Handle(literal.clazz()).is_finalized() ||
320 Class::Handle(literal.clazz()).is_prefinalized());
319 } 321 }
320 322
321 const Instance& literal() const { return literal_; } 323 const Instance& literal() const { return literal_; }
322 324
323 virtual const Instance* EvalConstExpr() const { 325 virtual const Instance* EvalConstExpr() const {
324 return &literal(); 326 return &literal();
325 } 327 }
326 328
327 virtual void VisitChildren(AstNodeVisitor* visitor) const { } 329 virtual void VisitChildren(AstNodeVisitor* visitor) const { }
328 330
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 const LocalVariable& context_var_; 1877 const LocalVariable& context_var_;
1876 1878
1877 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode); 1879 DISALLOW_IMPLICIT_CONSTRUCTORS(InlinedFinallyNode);
1878 }; 1880 };
1879 1881
1880 } // namespace dart 1882 } // namespace dart
1881 1883
1882 #undef DECLARE_COMMON_NODE_FUNCTIONS 1884 #undef DECLARE_COMMON_NODE_FUNCTIONS
1883 1885
1884 #endif // VM_AST_H_ 1886 #endif // VM_AST_H_
OLDNEW
« lib/regexp.cc ('K') | « lib/regexp.cc ('k') | vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698