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

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

Issue 502953002: Implement native _List. constructor in the flow-graph builder. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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_builder.cc ('k') | 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 4372 matching lines...) Expand 10 before | Expand all | Expand 10 after
4383 new(I) ZoneGrowableArray<Value*>(call->ArgumentCount()); 4383 new(I) ZoneGrowableArray<Value*>(call->ArgumentCount());
4384 for (intptr_t i = 0; i < call->ArgumentCount(); i++) { 4384 for (intptr_t i = 0; i < call->ArgumentCount(); i++) {
4385 args->Add(new(I) Value(call->ArgumentAt(i))); 4385 args->Add(new(I) Value(call->ArgumentAt(i)));
4386 } 4386 }
4387 InvokeMathCFunctionInstr* invoke = 4387 InvokeMathCFunctionInstr* invoke =
4388 new(I) InvokeMathCFunctionInstr(args, 4388 new(I) InvokeMathCFunctionInstr(args,
4389 call->deopt_id(), 4389 call->deopt_id(),
4390 recognized_kind, 4390 recognized_kind,
4391 call->token_pos()); 4391 call->token_pos());
4392 ReplaceCall(call, invoke); 4392 ReplaceCall(call, invoke);
4393 } else if (recognized_kind == MethodRecognizer::kObjectArrayAllocate) {
4394 Value* type = new(I) Value(call->ArgumentAt(0));
4395 Value* num_elements = new(I) Value(call->ArgumentAt(1));
4396 CreateArrayInstr* create_array =
4397 new(I) CreateArrayInstr(call->token_pos(), type, num_elements);
4398 ReplaceCall(call, create_array);
4399 } else if (recognized_kind == MethodRecognizer::kDoubleFromInteger) { 4393 } else if (recognized_kind == MethodRecognizer::kDoubleFromInteger) {
4400 if (call->HasICData() && (call->ic_data()->NumberOfChecks() == 1)) { 4394 if (call->HasICData() && (call->ic_data()->NumberOfChecks() == 1)) {
4401 const ICData& ic_data = *call->ic_data(); 4395 const ICData& ic_data = *call->ic_data();
4402 if (CanUnboxDouble() && ArgIsAlways(kSmiCid, ic_data, 0)) { 4396 if (CanUnboxDouble() && ArgIsAlways(kSmiCid, ic_data, 0)) {
4403 Definition* arg = call->ArgumentAt(0); 4397 Definition* arg = call->ArgumentAt(0);
4404 InsertBefore(call, 4398 InsertBefore(call,
4405 new(I) CheckSmiInstr( 4399 new(I) CheckSmiInstr(
4406 new(I) Value(arg), 4400 new(I) Value(arg),
4407 call->deopt_id(), 4401 call->deopt_id(),
4408 call->token_pos()), 4402 call->token_pos()),
(...skipping 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after
9618 9612
9619 // Insert materializations at environment uses. 9613 // Insert materializations at environment uses.
9620 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 9614 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
9621 CreateMaterializationAt( 9615 CreateMaterializationAt(
9622 exits_collector_.exits()[i], alloc, alloc->cls(), *slots); 9616 exits_collector_.exits()[i], alloc, alloc->cls(), *slots);
9623 } 9617 }
9624 } 9618 }
9625 9619
9626 9620
9627 } // namespace dart 9621 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698