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

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

Issue 11028140: Inlining of calls with optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review comments. Created 8 years, 2 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/flow_graph_inliner.cc ('k') | no next file » | 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/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/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry) 170 GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry)
171 : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex), 171 : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex),
172 normal_entry_(normal_entry), 172 normal_entry_(normal_entry),
173 catch_entries_(), 173 catch_entries_(),
174 initial_definitions_(), 174 initial_definitions_(),
175 spill_slot_count_(0) { 175 spill_slot_count_(0) {
176 } 176 }
177 177
178 178
179 ConstantInstr* GraphEntryInstr::constant_null() { 179 ConstantInstr* GraphEntryInstr::constant_null() {
180 ASSERT(initial_definitions_.length() > 0 && 180 ASSERT(initial_definitions_.length() > 0);
181 initial_definitions_[0]->IsConstant() && 181 for (intptr_t i = 0; i < initial_definitions_.length(); ++i) {
182 initial_definitions_[0]->AsConstant()->value().IsNull()); 182 ConstantInstr* defn = initial_definitions_[i]->AsConstant();
183 return initial_definitions_[0]->AsConstant(); 183 if (defn != NULL && defn->value().IsNull()) return defn;
184 }
185 UNREACHABLE();
186 return NULL;
184 } 187 }
185 188
186 189
187 static bool CompareNames(const Library& lib, 190 static bool CompareNames(const Library& lib,
188 const char* test_name, 191 const char* test_name,
189 const String& name) { 192 const String& name) {
190 // If both names are private mangle test_name before comparison. 193 // If both names are private mangle test_name before comparison.
191 if ((name.CharAt(0) == '_') && (test_name[0] == '_')) { 194 if ((name.CharAt(0) == '_') && (test_name[0] == '_')) {
192 const String& test_name_symbol = String::Handle(Symbols::New(test_name)); 195 const String& test_name_symbol = String::Handle(Symbols::New(test_name));
193 return String::Handle(lib.PrivateName(test_name_symbol)).Equals(name); 196 return String::Handle(lib.PrivateName(test_name_symbol)).Equals(name);
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 new_max = new_max.Clamp(); 2218 new_max = new_max.Clamp();
2216 } 2219 }
2217 2220
2218 return Range::Update(&range_, new_min, new_max); 2221 return Range::Update(&range_, new_min, new_max);
2219 } 2222 }
2220 2223
2221 2224
2222 #undef __ 2225 #undef __
2223 2226
2224 } // namespace dart 2227 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698