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

Side by Side Diff: runtime/vm/parser.cc

Issue 1404163002: VM: Precompile method extractors for implicit and explicit closurization. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed missing precompiled functions with hash-closurization Created 5 years, 2 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
OLDNEW
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/ast_transformer.h" 9 #include "vm/ast_transformer.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 } 1440 }
1441 StaticCallNode* call = new StaticCallNode(token_pos, parent, func_args); 1441 StaticCallNode* call = new StaticCallNode(token_pos, parent, func_args);
1442 ReturnNode* return_node = new ReturnNode(token_pos, call); 1442 ReturnNode* return_node = new ReturnNode(token_pos, call);
1443 current_block_->statements->Add(return_node); 1443 current_block_->statements->Add(return_node);
1444 return CloseBlock(); 1444 return CloseBlock();
1445 } 1445 }
1446 1446
1447 1447
1448 SequenceNode* Parser::ParseMethodExtractor(const Function& func) { 1448 SequenceNode* Parser::ParseMethodExtractor(const Function& func) {
1449 TRACE_PARSER("ParseMethodExtractor"); 1449 TRACE_PARSER("ParseMethodExtractor");
1450 ASSERT(FLAG_lazy_dispatchers);
1451 1450
1452 ParamList params; 1451 ParamList params;
1453 1452
1454 const intptr_t ident_pos = func.token_pos(); 1453 const intptr_t ident_pos = func.token_pos();
1455 ASSERT(func.token_pos() == 0); 1454 ASSERT(func.token_pos() == 0);
1456 ASSERT(current_class().raw() == func.Owner()); 1455 ASSERT(current_class().raw() == func.Owner());
1457 params.AddReceiver(ReceiverType(current_class()), ident_pos); 1456 params.AddReceiver(ReceiverType(current_class()), ident_pos);
1458 ASSERT(func.num_fixed_parameters() == 1); // Receiver. 1457 ASSERT(func.num_fixed_parameters() == 1); // Receiver.
1459 ASSERT(!func.HasOptionalParameters()); 1458 ASSERT(!func.HasOptionalParameters());
1460 1459
(...skipping 12843 matching lines...) Expand 10 before | Expand all | Expand 10 after
14304 void Parser::SkipQualIdent() { 14303 void Parser::SkipQualIdent() {
14305 ASSERT(IsIdentifier()); 14304 ASSERT(IsIdentifier());
14306 ConsumeToken(); 14305 ConsumeToken();
14307 if (CurrentToken() == Token::kPERIOD) { 14306 if (CurrentToken() == Token::kPERIOD) {
14308 ConsumeToken(); // Consume the kPERIOD token. 14307 ConsumeToken(); // Consume the kPERIOD token.
14309 ExpectIdentifier("identifier expected after '.'"); 14308 ExpectIdentifier("identifier expected after '.'");
14310 } 14309 }
14311 } 14310 }
14312 14311
14313 } // namespace dart 14312 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/precompiler.h » ('j') | runtime/vm/precompiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698