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

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

Issue 10356108: With removal of increment operations, each node has a unique id. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/ast.h ('k') | runtime/vm/opt_code_generator_ia32.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) 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 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 sequence_node->CollectAllNodes(&all_nodes); 63 sequence_node->CollectAllNodes(&all_nodes);
64 GrowableArray<intptr_t> node_ids; 64 GrowableArray<intptr_t> node_ids;
65 const GrowableObjectArray& ic_data_objs = 65 const GrowableObjectArray& ic_data_objs =
66 GrowableObjectArray::Handle(GrowableObjectArray::New()); 66 GrowableObjectArray::Handle(GrowableObjectArray::New());
67 code.ExtractIcDataArraysAtCalls(&node_ids, ic_data_objs); 67 code.ExtractIcDataArraysAtCalls(&node_ids, ic_data_objs);
68 ICData& ic_data_obj = ICData::Handle(); 68 ICData& ic_data_obj = ICData::Handle();
69 for (intptr_t i = 0; i < node_ids.length(); i++) { 69 for (intptr_t i = 0; i < node_ids.length(); i++) {
70 intptr_t node_id = node_ids[i]; 70 intptr_t node_id = node_ids[i];
71 bool found_node = false; 71 bool found_node = false;
72 for (intptr_t n = 0; n < all_nodes.length(); n++) { 72 for (intptr_t n = 0; n < all_nodes.length(); n++) {
73 if (all_nodes[n]->HasId(node_id)) { 73 if (all_nodes[n]->id() == node_id) {
74 found_node = true; 74 found_node = true;
75 // Make sure we assign ic data array only once. 75 // Make sure we assign ic data array only once.
76 ASSERT(all_nodes[n]->ICDataAtId(node_id).IsNull()); 76 ASSERT(all_nodes[n]->ic_data().IsNull());
77 ic_data_obj ^= ic_data_objs.At(i); 77 ic_data_obj ^= ic_data_objs.At(i);
78 all_nodes[n]->SetIcDataAtId(node_id, ic_data_obj); 78 all_nodes[n]->set_ic_data(ic_data_obj);
79 } 79 }
80 } 80 }
81 ASSERT(found_node); 81 ASSERT(found_node);
82 } 82 }
83 } 83 }
84 84
85 85
86 RawError* Compiler::Compile(const Library& library, const Script& script) { 86 RawError* Compiler::Compile(const Library& library, const Script& script) {
87 Isolate* isolate = Isolate::Current(); 87 Isolate* isolate = Isolate::Current();
88 LongJump* base = isolate->long_jump_base(); 88 LongJump* base = isolate->long_jump_base();
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 isolate->object_store()->clear_sticky_error(); 512 isolate->object_store()->clear_sticky_error();
513 isolate->set_long_jump_base(base); 513 isolate->set_long_jump_base(base);
514 return result.raw(); 514 return result.raw();
515 } 515 }
516 UNREACHABLE(); 516 UNREACHABLE();
517 return Object::null(); 517 return Object::null();
518 } 518 }
519 519
520 520
521 } // namespace dart 521 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/opt_code_generator_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698