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

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

Issue 497623003: Fix performance degradation in Havlak: prevent conflicting method recognizer kinds to be stored in … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/intrinsifier_arm.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) 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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4367 matching lines...) Expand 10 before | Expand all | Expand 10 after
4378 new(I) ZoneGrowableArray<Value*>(call->ArgumentCount()); 4378 new(I) ZoneGrowableArray<Value*>(call->ArgumentCount());
4379 for (intptr_t i = 0; i < call->ArgumentCount(); i++) { 4379 for (intptr_t i = 0; i < call->ArgumentCount(); i++) {
4380 args->Add(new(I) Value(call->ArgumentAt(i))); 4380 args->Add(new(I) Value(call->ArgumentAt(i)));
4381 } 4381 }
4382 InvokeMathCFunctionInstr* invoke = 4382 InvokeMathCFunctionInstr* invoke =
4383 new(I) InvokeMathCFunctionInstr(args, 4383 new(I) InvokeMathCFunctionInstr(args,
4384 call->deopt_id(), 4384 call->deopt_id(),
4385 recognized_kind, 4385 recognized_kind,
4386 call->token_pos()); 4386 call->token_pos());
4387 ReplaceCall(call, invoke); 4387 ReplaceCall(call, invoke);
4388 } else if (recognized_kind == MethodRecognizer::kObjectArrayConstructor) { 4388 } else if (recognized_kind == MethodRecognizer::kObjectArrayAllocate) {
4389 Value* type = new(I) Value(call->ArgumentAt(0)); 4389 Value* type = new(I) Value(call->ArgumentAt(0));
4390 Value* num_elements = new(I) Value(call->ArgumentAt(1)); 4390 Value* num_elements = new(I) Value(call->ArgumentAt(1));
4391 CreateArrayInstr* create_array = 4391 CreateArrayInstr* create_array =
4392 new(I) CreateArrayInstr(call->token_pos(), type, num_elements); 4392 new(I) CreateArrayInstr(call->token_pos(), type, num_elements);
4393 ReplaceCall(call, create_array); 4393 ReplaceCall(call, create_array);
4394 } else if (recognized_kind == MethodRecognizer::kDoubleFromInteger) { 4394 } else if (recognized_kind == MethodRecognizer::kDoubleFromInteger) {
4395 if (call->HasICData() && (call->ic_data()->NumberOfChecks() == 1)) { 4395 if (call->HasICData() && (call->ic_data()->NumberOfChecks() == 1)) {
4396 const ICData& ic_data = *call->ic_data(); 4396 const ICData& ic_data = *call->ic_data();
4397 if (CanUnboxDouble() && ArgIsAlways(kSmiCid, ic_data, 0)) { 4397 if (CanUnboxDouble() && ArgIsAlways(kSmiCid, ic_data, 0)) {
4398 Definition* arg = call->ArgumentAt(0); 4398 Definition* arg = call->ArgumentAt(0);
(...skipping 5214 matching lines...) Expand 10 before | Expand all | Expand 10 after
9613 9613
9614 // Insert materializations at environment uses. 9614 // Insert materializations at environment uses.
9615 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 9615 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
9616 CreateMaterializationAt( 9616 CreateMaterializationAt(
9617 exits_collector_.exits()[i], alloc, alloc->cls(), *slots); 9617 exits_collector_.exits()[i], alloc, alloc->cls(), *slots);
9618 } 9618 }
9619 } 9619 }
9620 9620
9621 9621
9622 } // namespace dart 9622 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698