| OLD | NEW |
| 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 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 int TraceParser::indent_ = 0; | 67 int TraceParser::indent_ = 0; |
| 68 | 68 |
| 69 #define TRACE_PARSER(s) \ | 69 #define TRACE_PARSER(s) \ |
| 70 TraceParser __p__(this->token_index_, this->script_, s) | 70 TraceParser __p__(this->token_index_, this->script_, s) |
| 71 | 71 |
| 72 #else // not DEBUG | 72 #else // not DEBUG |
| 73 #define TRACE_PARSER(s) | 73 #define TRACE_PARSER(s) |
| 74 #endif // DEBUG | 74 #endif // DEBUG |
| 75 | 75 |
| 76 | 76 |
| 77 static const char* kManglePrefix = "this:"; | |
| 78 | |
| 79 | |
| 80 template<typename T> | 77 template<typename T> |
| 81 static RawArray* NewArray(const GrowableArray<T*>& objs) { | 78 static RawArray* NewArray(const GrowableArray<T*>& objs) { |
| 82 Array& a = Array::Handle(Array::New(objs.length(), Heap::kOld)); | 79 Array& a = Array::Handle(Array::New(objs.length(), Heap::kOld)); |
| 83 for (int i = 0; i < objs.length(); i++) { | 80 for (int i = 0; i < objs.length(); i++) { |
| 84 a.SetAt(i, *objs[i]); | 81 a.SetAt(i, *objs[i]); |
| 85 } | 82 } |
| 86 return a.raw(); | 83 return a.raw(); |
| 87 } | 84 } |
| 88 | 85 |
| 89 | 86 |
| (...skipping 7434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7524 } | 7521 } |
| 7525 | 7522 |
| 7526 | 7523 |
| 7527 void Parser::SkipNestedExpr() { | 7524 void Parser::SkipNestedExpr() { |
| 7528 const bool saved_mode = SetAllowFunctionLiterals(true); | 7525 const bool saved_mode = SetAllowFunctionLiterals(true); |
| 7529 SkipExpr(); | 7526 SkipExpr(); |
| 7530 SetAllowFunctionLiterals(saved_mode); | 7527 SetAllowFunctionLiterals(saved_mode); |
| 7531 } | 7528 } |
| 7532 | 7529 |
| 7533 } // namespace dart | 7530 } // namespace dart |
| OLD | NEW |