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

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

Issue 10832397: Test functions do not have scripts associated with them. Prevent their optimization by marking any … (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
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 true, // static function. 513 true, // static function.
514 false, // not const function. 514 false, // not const function.
515 false, // not abstract 515 false, // not abstract
516 false, // not external. 516 false, // not external.
517 Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()), 517 Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()),
518 fragment->token_pos())); 518 fragment->token_pos()));
519 519
520 func.set_result_type(Type::Handle(Type::DynamicType())); 520 func.set_result_type(Type::Handle(Type::DynamicType()));
521 func.set_num_fixed_parameters(0); 521 func.set_num_fixed_parameters(0);
522 func.set_num_optional_parameters(0); 522 func.set_num_optional_parameters(0);
523 // Manually generated AST, do not recompile.
524 func.set_is_optimizable(false);
523 525
524 // We compile the function here, even though InvokeStatic() below 526 // We compile the function here, even though InvokeStatic() below
525 // would compile func automatically. We are checking fewer invariants 527 // would compile func automatically. We are checking fewer invariants
526 // here. 528 // here.
527 ParsedFunction parsed_function(func); 529 ParsedFunction parsed_function(func);
528 parsed_function.SetNodeSequence(fragment); 530 parsed_function.SetNodeSequence(fragment);
529 parsed_function.set_default_parameter_values(Array::Handle()); 531 parsed_function.set_default_parameter_values(Array::Handle());
530 parsed_function.set_expression_temp_var( 532 parsed_function.set_expression_temp_var(
531 ParsedFunction::CreateExpressionTempVar(0)); 533 ParsedFunction::CreateExpressionTempVar(0));
532 fragment->scope()->AddVariable(parsed_function.expression_temp_var()); 534 fragment->scope()->AddVariable(parsed_function.expression_temp_var());
(...skipping 15 matching lines...) Expand all
548 result = isolate->object_store()->sticky_error(); 550 result = isolate->object_store()->sticky_error();
549 isolate->object_store()->clear_sticky_error(); 551 isolate->object_store()->clear_sticky_error();
550 isolate->set_long_jump_base(base); 552 isolate->set_long_jump_base(base);
551 return result.raw(); 553 return result.raw();
552 } 554 }
553 UNREACHABLE(); 555 UNREACHABLE();
554 return Object::null(); 556 return Object::null();
555 } 557 }
556 558
557 } // namespace dart 559 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698