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

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, 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // The function needs to be associated with a named Class: the interface 509 // The function needs to be associated with a named Class: the interface
510 // Function fits the bill. 510 // Function fits the bill.
511 const char* kEvalConst = "eval_const"; 511 const char* kEvalConst = "eval_const";
512 const Function& func = Function::Handle(Function::New( 512 const Function& func = Function::Handle(Function::New(
513 String::Handle(Symbols::New(kEvalConst)), 513 String::Handle(Symbols::New(kEvalConst)),
514 RawFunction::kConstImplicitGetter, 514 RawFunction::kConstImplicitGetter,
515 true, // static function. 515 true, // static function.
516 false, // not const function. 516 false, // not const function.
517 false, // not abstract 517 false, // not abstract
518 false, // not external. 518 false, // not external.
519 Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()), 519 Class::Handle(Type::Handle(Type::Function()).type_class()),
520 fragment->token_pos())); 520 fragment->token_pos()));
521 521
522 func.set_result_type(Type::Handle(Type::DynamicType())); 522 func.set_result_type(Type::Handle(Type::DynamicType()));
523 func.set_num_fixed_parameters(0); 523 func.set_num_fixed_parameters(0);
524 func.set_num_optional_parameters(0); 524 func.set_num_optional_parameters(0);
525 // Manually generated AST, do not recompile. 525 // Manually generated AST, do not recompile.
526 func.set_is_optimizable(false); 526 func.set_is_optimizable(false);
527 527
528 // We compile the function here, even though InvokeStatic() below 528 // We compile the function here, even though InvokeStatic() below
529 // would compile func automatically. We are checking fewer invariants 529 // would compile func automatically. We are checking fewer invariants
(...skipping 22 matching lines...) Expand all
552 result = isolate->object_store()->sticky_error(); 552 result = isolate->object_store()->sticky_error();
553 isolate->object_store()->clear_sticky_error(); 553 isolate->object_store()->clear_sticky_error();
554 isolate->set_long_jump_base(base); 554 isolate->set_long_jump_base(base);
555 return result.raw(); 555 return result.raw();
556 } 556 }
557 UNREACHABLE(); 557 UNREACHABLE();
558 return Object::null(); 558 return Object::null();
559 } 559 }
560 560
561 } // namespace dart 561 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698