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

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

Issue 1528873002: VM: Use read-only handle Object::dynamic_type() where possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/constant_propagator.cc » ('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 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1496 String::Handle(Symbols::New(kEvalConst)), 1496 String::Handle(Symbols::New(kEvalConst)),
1497 RawFunction::kRegularFunction, 1497 RawFunction::kRegularFunction,
1498 true, // static function 1498 true, // static function
1499 false, // not const function 1499 false, // not const function
1500 false, // not abstract 1500 false, // not abstract
1501 false, // not external 1501 false, // not external
1502 false, // not native 1502 false, // not native
1503 Class::Handle(Type::Handle(Type::Function()).type_class()), 1503 Class::Handle(Type::Handle(Type::Function()).type_class()),
1504 fragment->token_pos())); 1504 fragment->token_pos()));
1505 1505
1506 func.set_result_type(Type::Handle(Type::DynamicType())); 1506 func.set_result_type(Object::dynamic_type());
1507 func.set_num_fixed_parameters(0); 1507 func.set_num_fixed_parameters(0);
1508 func.SetNumOptionalParameters(0, true); 1508 func.SetNumOptionalParameters(0, true);
1509 // Manually generated AST, do not recompile. 1509 // Manually generated AST, do not recompile.
1510 func.SetIsOptimizable(false); 1510 func.SetIsOptimizable(false);
1511 func.set_is_debuggable(false); 1511 func.set_is_debuggable(false);
1512 1512
1513 // We compile the function here, even though InvokeFunction() below 1513 // We compile the function here, even though InvokeFunction() below
1514 // would compile func automatically. We are checking fewer invariants 1514 // would compile func automatically. We are checking fewer invariants
1515 // here. 1515 // here.
1516 ParsedFunction* parsed_function = new ParsedFunction(thread, func); 1516 ParsedFunction* parsed_function = new ParsedFunction(thread, func);
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 } 1888 }
1889 1889
1890 1890
1891 void BackgroundCompiler::EnsureInit(Thread* thread) { 1891 void BackgroundCompiler::EnsureInit(Thread* thread) {
1892 UNREACHABLE(); 1892 UNREACHABLE();
1893 } 1893 }
1894 1894
1895 #endif // DART_PRECOMPILED 1895 #endif // DART_PRECOMPILED
1896 1896
1897 } // namespace dart 1897 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/constant_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698