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

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

Issue 356923006: Iterate over PcDescriptors only via iterators, not via an index. (preparation for more compression … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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
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/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2047 LocationSummary* JoinEntryInstr::MakeLocationSummary(Isolate* isolate, 2047 LocationSummary* JoinEntryInstr::MakeLocationSummary(Isolate* isolate,
2048 bool optimizing) const { 2048 bool optimizing) const {
2049 UNREACHABLE(); 2049 UNREACHABLE();
2050 return NULL; 2050 return NULL;
2051 } 2051 }
2052 2052
2053 2053
2054 void JoinEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2054 void JoinEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2055 __ Bind(compiler->GetJumpLabel(this)); 2055 __ Bind(compiler->GetJumpLabel(this));
2056 if (!compiler->is_optimizing()) { 2056 if (!compiler->is_optimizing()) {
2057 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 2057 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
2058 deopt_id_, 2058 deopt_id_,
2059 Scanner::kNoSourcePos); 2059 Scanner::kNoSourcePos);
2060 } 2060 }
2061 if (HasParallelMove()) { 2061 if (HasParallelMove()) {
2062 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 2062 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
2063 } 2063 }
2064 } 2064 }
2065 2065
2066 2066
2067 LocationSummary* TargetEntryInstr::MakeLocationSummary(Isolate* isolate, 2067 LocationSummary* TargetEntryInstr::MakeLocationSummary(Isolate* isolate,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2285 compiler->GenerateInstanceCall(deopt_id(), 2285 compiler->GenerateInstanceCall(deopt_id(),
2286 token_pos(), 2286 token_pos(),
2287 ArgumentCount(), 2287 ArgumentCount(),
2288 argument_names(), 2288 argument_names(),
2289 locs(), 2289 locs(),
2290 *call_ic_data); 2290 *call_ic_data);
2291 } 2291 }
2292 } else { 2292 } else {
2293 // Unoptimized code. 2293 // Unoptimized code.
2294 ASSERT(!HasICData()); 2294 ASSERT(!HasICData());
2295 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 2295 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
2296 deopt_id(), 2296 deopt_id(),
2297 token_pos()); 2297 token_pos());
2298 compiler->GenerateInstanceCall(deopt_id(), 2298 compiler->GenerateInstanceCall(deopt_id(),
2299 token_pos(), 2299 token_pos(),
2300 ArgumentCount(), 2300 ArgumentCount(),
2301 argument_names(), 2301 argument_names(),
2302 locs(), 2302 locs(),
2303 *call_ic_data); 2303 *call_ic_data);
2304 } 2304 }
2305 } 2305 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 call_ic_data = compiler->GetOrAddStaticCallICData(deopt_id(), 2348 call_ic_data = compiler->GetOrAddStaticCallICData(deopt_id(),
2349 function(), 2349 function(),
2350 arguments_descriptor, 2350 arguments_descriptor,
2351 num_args_checked); 2351 num_args_checked);
2352 } else { 2352 } else {
2353 call_ic_data = &ICData::ZoneHandle(ic_data()->raw()); 2353 call_ic_data = &ICData::ZoneHandle(ic_data()->raw());
2354 } 2354 }
2355 if (!compiler->is_optimizing()) { 2355 if (!compiler->is_optimizing()) {
2356 // Some static calls can be optimized by the optimizing compiler (e.g. sqrt) 2356 // Some static calls can be optimized by the optimizing compiler (e.g. sqrt)
2357 // and therefore need a deoptimization descriptor. 2357 // and therefore need a deoptimization descriptor.
2358 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 2358 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
2359 deopt_id(), 2359 deopt_id(),
2360 token_pos()); 2360 token_pos());
2361 } 2361 }
2362 compiler->GenerateStaticCall(deopt_id(), 2362 compiler->GenerateStaticCall(deopt_id(),
2363 token_pos(), 2363 token_pos(),
2364 function(), 2364 function(),
2365 ArgumentCount(), 2365 ArgumentCount(),
2366 argument_names(), 2366 argument_names(),
2367 locs(), 2367 locs(),
2368 *call_ic_data); 2368 *call_ic_data);
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
3975 case Token::kTRUNCDIV: return 0; 3975 case Token::kTRUNCDIV: return 0;
3976 case Token::kMOD: return 1; 3976 case Token::kMOD: return 1;
3977 default: UNIMPLEMENTED(); return -1; 3977 default: UNIMPLEMENTED(); return -1;
3978 } 3978 }
3979 } 3979 }
3980 3980
3981 3981
3982 #undef __ 3982 #undef __
3983 3983
3984 } // namespace dart 3984 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698