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

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

Issue 10821076: - Allow parsing of external methods. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 AstPrinter::PrintNode(fragment); 441 AstPrinter::PrintNode(fragment);
442 } 442 }
443 443
444 // Create a dummy function object for the code generator. 444 // Create a dummy function object for the code generator.
445 const char* kEvalConst = "eval_const"; 445 const char* kEvalConst = "eval_const";
446 const Function& func = Function::Handle(Function::New( 446 const Function& func = Function::Handle(Function::New(
447 String::Handle(Symbols::New(kEvalConst)), 447 String::Handle(Symbols::New(kEvalConst)),
448 RawFunction::kConstImplicitGetter, 448 RawFunction::kConstImplicitGetter,
449 true, // static function. 449 true, // static function.
450 false, // not const function. 450 false, // not const function.
451 false, // not external
siva 2012/07/30 17:12:39 missing '.'
Ivan Posva 2012/07/30 22:33:33 Done.
451 fragment->token_pos())); 452 fragment->token_pos()));
452 453
453 func.set_result_type(Type::Handle(Type::DynamicType())); 454 func.set_result_type(Type::Handle(Type::DynamicType()));
454 func.set_num_fixed_parameters(0); 455 func.set_num_fixed_parameters(0);
455 func.set_num_optional_parameters(0); 456 func.set_num_optional_parameters(0);
456 457
457 // The function needs to be associated with a named Class: the interface 458 // The function needs to be associated with a named Class: the interface
458 // Function fits the bill. 459 // Function fits the bill.
459 func.set_owner(Class::Handle( 460 func.set_owner(Class::Handle(
460 Type::Handle(Type::FunctionInterface()).type_class())); 461 Type::Handle(Type::FunctionInterface()).type_class()));
(...skipping 26 matching lines...) Expand all
487 isolate->object_store()->clear_sticky_error(); 488 isolate->object_store()->clear_sticky_error();
488 isolate->set_long_jump_base(base); 489 isolate->set_long_jump_base(base);
489 return result.raw(); 490 return result.raw();
490 } 491 }
491 UNREACHABLE(); 492 UNREACHABLE();
492 return Object::null(); 493 return Object::null();
493 } 494 }
494 495
495 496
496 } // namespace dart 497 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698