| 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 "vm/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 6271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6282 ASSERT(var != NULL); | 6282 ASSERT(var != NULL); |
| 6283 ASSERT(catch_excp_var != NULL); | 6283 ASSERT(catch_excp_var != NULL); |
| 6284 current_block_->statements->Add( | 6284 current_block_->statements->Add( |
| 6285 new StoreLocalNode(catch_pos, var, | 6285 new StoreLocalNode(catch_pos, var, |
| 6286 new LoadLocalNode(catch_pos, catch_excp_var))); | 6286 new LoadLocalNode(catch_pos, catch_excp_var))); |
| 6287 } | 6287 } |
| 6288 if (stack_trace_param.var != NULL) { | 6288 if (stack_trace_param.var != NULL) { |
| 6289 // A stack trace variable is specified in this block, so generate code | 6289 // A stack trace variable is specified in this block, so generate code |
| 6290 // to load the stack trace object (:stacktrace_var) into the stack trace | 6290 // to load the stack trace object (:stacktrace_var) into the stack trace |
| 6291 // variable specified in this block. | 6291 // variable specified in this block. |
| 6292 ArgumentListNode* no_args = new ArgumentListNode(catch_pos); |
| 6292 LocalVariable* trace = LookupLocalScope(*stack_trace_param.var); | 6293 LocalVariable* trace = LookupLocalScope(*stack_trace_param.var); |
| 6293 ASSERT(catch_trace_var != NULL); | 6294 ASSERT(catch_trace_var != NULL); |
| 6294 current_block_->statements->Add( | 6295 current_block_->statements->Add( |
| 6295 new StoreLocalNode(catch_pos, trace, | 6296 new StoreLocalNode(catch_pos, trace, |
| 6296 new LoadLocalNode(catch_pos, catch_trace_var))); | 6297 new LoadLocalNode(catch_pos, catch_trace_var))); |
| 6298 current_block_->statements->Add( |
| 6299 new InstanceCallNode( |
| 6300 catch_pos, |
| 6301 new LoadLocalNode(catch_pos, trace), |
| 6302 PrivateCoreLibName(Symbols::_setupFullStacktrace()), |
| 6303 no_args)); |
| 6297 } | 6304 } |
| 6298 | 6305 |
| 6299 ParseStatementSequence(); // Parse the catch handler code. | 6306 ParseStatementSequence(); // Parse the catch handler code. |
| 6300 current_block_->statements->Add( | 6307 current_block_->statements->Add( |
| 6301 new JumpNode(catch_pos, Token::kCONTINUE, end_catch_label)); | 6308 new JumpNode(catch_pos, Token::kCONTINUE, end_catch_label)); |
| 6302 SequenceNode* catch_handler = CloseBlock(); | 6309 SequenceNode* catch_handler = CloseBlock(); |
| 6303 ExpectToken(Token::kRBRACE); | 6310 ExpectToken(Token::kRBRACE); |
| 6304 | 6311 |
| 6305 if (!exception_param.type->IsDynamicType()) { // Has a type specification. | 6312 if (!exception_param.type->IsDynamicType()) { // Has a type specification. |
| 6306 // Now form an 'if type check' as an exception type exists in | 6313 // Now form an 'if type check' as an exception type exists in |
| (...skipping 3746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10053 void Parser::SkipQualIdent() { | 10060 void Parser::SkipQualIdent() { |
| 10054 ASSERT(IsIdentifier()); | 10061 ASSERT(IsIdentifier()); |
| 10055 ConsumeToken(); | 10062 ConsumeToken(); |
| 10056 if (CurrentToken() == Token::kPERIOD) { | 10063 if (CurrentToken() == Token::kPERIOD) { |
| 10057 ConsumeToken(); // Consume the kPERIOD token. | 10064 ConsumeToken(); // Consume the kPERIOD token. |
| 10058 ExpectIdentifier("identifier expected after '.'"); | 10065 ExpectIdentifier("identifier expected after '.'"); |
| 10059 } | 10066 } |
| 10060 } | 10067 } |
| 10061 | 10068 |
| 10062 } // namespace dart | 10069 } // namespace dart |
| OLD | NEW |