Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
| 9 #include "vm/bootstrap.h" | 9 #include "vm/bootstrap.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2938 func.set_end_token_pos(end_token_pos); | 2938 func.set_end_token_pos(end_token_pos); |
| 2939 SequenceNode* body = CloseBlock(); | 2939 SequenceNode* body = CloseBlock(); |
| 2940 current_block_->statements->Add(body); | 2940 current_block_->statements->Add(body); |
| 2941 innermost_function_ = saved_innermost_function.raw(); | 2941 innermost_function_ = saved_innermost_function.raw(); |
| 2942 last_used_try_index_ = saved_try_index; | 2942 last_used_try_index_ = saved_try_index; |
| 2943 return CloseBlock(); | 2943 return CloseBlock(); |
| 2944 } | 2944 } |
| 2945 | 2945 |
| 2946 | 2946 |
| 2947 void Parser::AddEqualityNullCheck() { | 2947 void Parser::AddEqualityNullCheck() { |
| 2948 const intptr_t token_pos = Scanner::kDummyTokenIndex; | 2948 const intptr_t token_pos = TokenPos(); |
|
Florian Schneider
2014/01/20 11:36:28
Undo this change.
| |
| 2949 AstNode* argument = | 2949 AstNode* argument = |
| 2950 new LoadLocalNode(token_pos, | 2950 new LoadLocalNode(token_pos, |
| 2951 current_block_->scope->parent()->VariableAt(1)); | 2951 current_block_->scope->parent()->VariableAt(1)); |
| 2952 LiteralNode* null_operand = | 2952 LiteralNode* null_operand = |
| 2953 new LiteralNode(token_pos, Instance::ZoneHandle()); | 2953 new LiteralNode(token_pos, Instance::ZoneHandle()); |
| 2954 ComparisonNode* check_arg = new ComparisonNode(token_pos, | 2954 ComparisonNode* check_arg = new ComparisonNode(token_pos, |
| 2955 Token::kEQ_STRICT, | 2955 Token::kEQ_STRICT, |
| 2956 argument, | 2956 argument, |
| 2957 null_operand); | 2957 null_operand); |
| 2958 ComparisonNode* result = new ComparisonNode(token_pos, | 2958 ComparisonNode* result = new ComparisonNode(token_pos, |
| (...skipping 7791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10750 void Parser::SkipQualIdent() { | 10750 void Parser::SkipQualIdent() { |
| 10751 ASSERT(IsIdentifier()); | 10751 ASSERT(IsIdentifier()); |
| 10752 ConsumeToken(); | 10752 ConsumeToken(); |
| 10753 if (CurrentToken() == Token::kPERIOD) { | 10753 if (CurrentToken() == Token::kPERIOD) { |
| 10754 ConsumeToken(); // Consume the kPERIOD token. | 10754 ConsumeToken(); // Consume the kPERIOD token. |
| 10755 ExpectIdentifier("identifier expected after '.'"); | 10755 ExpectIdentifier("identifier expected after '.'"); |
| 10756 } | 10756 } |
| 10757 } | 10757 } |
| 10758 | 10758 |
| 10759 } // namespace dart | 10759 } // namespace dart |
| OLD | NEW |