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

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

Issue 878243002: Cleanup: use const reference for ParsedFunction where possible. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intrinsifier.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/constant_propagator.h" 8 #include "vm/constant_propagator.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 464
465 const Object& Value::BoundConstant() const { 465 const Object& Value::BoundConstant() const {
466 ASSERT(BindsToConstant()); 466 ASSERT(BindsToConstant());
467 ConstantInstr* constant = definition()->AsConstant(); 467 ConstantInstr* constant = definition()->AsConstant();
468 ASSERT(constant != NULL); 468 ASSERT(constant != NULL);
469 return constant->value(); 469 return constant->value();
470 } 470 }
471 471
472 472
473 GraphEntryInstr::GraphEntryInstr(const ParsedFunction* parsed_function, 473 GraphEntryInstr::GraphEntryInstr(const ParsedFunction& parsed_function,
474 TargetEntryInstr* normal_entry, 474 TargetEntryInstr* normal_entry,
475 intptr_t osr_id) 475 intptr_t osr_id)
476 : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex), 476 : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex),
477 parsed_function_(parsed_function), 477 parsed_function_(parsed_function),
478 normal_entry_(normal_entry), 478 normal_entry_(normal_entry),
479 catch_entries_(), 479 catch_entries_(),
480 indirect_entries_(), 480 indirect_entries_(),
481 initial_definitions_(), 481 initial_definitions_(),
482 osr_id_(osr_id), 482 osr_id_(osr_id),
483 entry_count_(0), 483 entry_count_(0),
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2995 2995
2996 2996
2997 void DeoptimizeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2997 void DeoptimizeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2998 __ Jump(compiler->AddDeoptStub(deopt_id(), deopt_reason_)); 2998 __ Jump(compiler->AddDeoptStub(deopt_id(), deopt_reason_));
2999 } 2999 }
3000 3000
3001 3001
3002 Environment* Environment::From(Isolate* isolate, 3002 Environment* Environment::From(Isolate* isolate,
3003 const GrowableArray<Definition*>& definitions, 3003 const GrowableArray<Definition*>& definitions,
3004 intptr_t fixed_parameter_count, 3004 intptr_t fixed_parameter_count,
3005 const ParsedFunction* parsed_function) { 3005 const ParsedFunction& parsed_function) {
3006 Environment* env = 3006 Environment* env =
3007 new(isolate) Environment(definitions.length(), 3007 new(isolate) Environment(definitions.length(),
3008 fixed_parameter_count, 3008 fixed_parameter_count,
3009 Isolate::kNoDeoptId, 3009 Isolate::kNoDeoptId,
3010 parsed_function, 3010 parsed_function,
3011 NULL); 3011 NULL);
3012 for (intptr_t i = 0; i < definitions.length(); ++i) { 3012 for (intptr_t i = 0; i < definitions.length(); ++i) {
3013 env->values_.Add(new(isolate) Value(definitions[i])); 3013 env->values_.Add(new(isolate) Value(definitions[i]));
3014 } 3014 }
3015 return env; 3015 return env;
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
3490 case Token::kTRUNCDIV: return 0; 3490 case Token::kTRUNCDIV: return 0;
3491 case Token::kMOD: return 1; 3491 case Token::kMOD: return 1;
3492 default: UNIMPLEMENTED(); return -1; 3492 default: UNIMPLEMENTED(); return -1;
3493 } 3493 }
3494 } 3494 }
3495 3495
3496 3496
3497 #undef __ 3497 #undef __
3498 3498
3499 } // namespace dart 3499 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intrinsifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698