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

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

Issue 10832401: Gentle start with removing explicit interfaces (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 // The function needs to be associated with a named Class: the interface 513 // The function needs to be associated with a named Class: the interface
514 // Function fits the bill. 514 // Function fits the bill.
515 const char* kEvalConst = "eval_const"; 515 const char* kEvalConst = "eval_const";
516 const Function& func = Function::Handle(Function::New( 516 const Function& func = Function::Handle(Function::New(
517 String::Handle(Symbols::New(kEvalConst)), 517 String::Handle(Symbols::New(kEvalConst)),
518 RawFunction::kConstImplicitGetter, 518 RawFunction::kConstImplicitGetter,
519 true, // static function. 519 true, // static function.
520 false, // not const function. 520 false, // not const function.
521 false, // not abstract 521 false, // not abstract
522 false, // not external. 522 false, // not external.
523 Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()), 523 Class::Handle(Type::Handle(Type::Function()).type_class()),
524 fragment->token_pos())); 524 fragment->token_pos()));
525 525
526 func.set_result_type(Type::Handle(Type::DynamicType())); 526 func.set_result_type(Type::Handle(Type::DynamicType()));
527 func.set_num_fixed_parameters(0); 527 func.set_num_fixed_parameters(0);
528 func.set_num_optional_parameters(0); 528 func.set_num_optional_parameters(0);
529 // Manually generated AST, do not recompile. 529 // Manually generated AST, do not recompile.
530 func.set_is_optimizable(false); 530 func.set_is_optimizable(false);
531 531
532 // We compile the function here, even though InvokeStatic() below 532 // We compile the function here, even though InvokeStatic() below
533 // would compile func automatically. We are checking fewer invariants 533 // would compile func automatically. We are checking fewer invariants
(...skipping 22 matching lines...) Expand all
556 result = isolate->object_store()->sticky_error(); 556 result = isolate->object_store()->sticky_error();
557 isolate->object_store()->clear_sticky_error(); 557 isolate->object_store()->clear_sticky_error();
558 isolate->set_long_jump_base(base); 558 isolate->set_long_jump_base(base);
559 return result.raw(); 559 return result.raw();
560 } 560 }
561 UNREACHABLE(); 561 UNREACHABLE();
562 return Object::null(); 562 return Object::null();
563 } 563 }
564 564
565 } // namespace dart 565 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698