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

Side by Side Diff: runtime/vm/intermediate_language_arm.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/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 // R4: Arguments descriptor. 212 // R4: Arguments descriptor.
213 // R0: Function. 213 // R0: Function.
214 ASSERT(locs()->in(0).reg() == R0); 214 ASSERT(locs()->in(0).reg() == R0);
215 __ ldr(R2, FieldAddress(R0, Function::instructions_offset())); 215 __ ldr(R2, FieldAddress(R0, Function::instructions_offset()));
216 216
217 // R2: instructions. 217 // R2: instructions.
218 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). 218 // R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
219 __ LoadImmediate(R5, 0); 219 __ LoadImmediate(R5, 0);
220 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag); 220 __ AddImmediate(R2, Instructions::HeaderSize() - kHeapObjectTag);
221 __ blx(R2); 221 __ blx(R2);
222 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, 222 compiler->AddCurrentDescriptor(RawPcDescriptors::kClosureCall,
223 deopt_id(), 223 deopt_id(),
224 token_pos()); 224 token_pos());
225 compiler->RecordSafepoint(locs()); 225 compiler->RecordSafepoint(locs());
226 // Marks either the continuation point in unoptimized code or the 226 // Marks either the continuation point in unoptimized code or the
227 // deoptimization point in optimized code, after call. 227 // deoptimization point in optimized code, after call.
228 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); 228 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id());
229 if (compiler->is_optimizing()) { 229 if (compiler->is_optimizing()) {
230 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); 230 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos());
231 } else { 231 } else {
232 // Add deoptimization continuation point after the call and before the 232 // Add deoptimization continuation point after the call and before the
233 // arguments are removed. 233 // arguments are removed.
234 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 234 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
235 deopt_id_after, 235 deopt_id_after,
236 token_pos()); 236 token_pos());
237 } 237 }
238 __ Drop(argument_count); 238 __ Drop(argument_count);
239 } 239 }
240 240
241 241
242 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate, 242 LocationSummary* LoadLocalInstr::MakeLocationSummary(Isolate* isolate,
243 bool opt) const { 243 bool opt) const {
244 return LocationSummary::Make(isolate, 244 return LocationSummary::Make(isolate,
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 if (!function().IsNativeAutoSetupScope()) { 944 if (!function().IsNativeAutoSetupScope()) {
945 entry = Simulator::RedirectExternalReference( 945 entry = Simulator::RedirectExternalReference(
946 entry, Simulator::kBootstrapNativeCall, function().NumParameters()); 946 entry, Simulator::kBootstrapNativeCall, function().NumParameters());
947 } 947 }
948 #endif 948 #endif
949 } 949 }
950 __ LoadImmediate(R5, entry); 950 __ LoadImmediate(R5, entry);
951 __ LoadImmediate(R1, argc_tag); 951 __ LoadImmediate(R1, argc_tag);
952 compiler->GenerateCall(token_pos(), 952 compiler->GenerateCall(token_pos(),
953 stub_entry, 953 stub_entry,
954 PcDescriptors::kOther, 954 RawPcDescriptors::kOther,
955 locs()); 955 locs());
956 __ Pop(result); 956 __ Pop(result);
957 } 957 }
958 958
959 959
960 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Isolate* isolate, 960 LocationSummary* StringFromCharCodeInstr::MakeLocationSummary(Isolate* isolate,
961 bool opt) const { 961 bool opt) const {
962 const intptr_t kNumInputs = 1; 962 const intptr_t kNumInputs = 1;
963 // TODO(fschneider): Allow immediate operands for the char code. 963 // TODO(fschneider): Allow immediate operands for the char code.
964 return LocationSummary::Make(isolate, 964 return LocationSummary::Make(isolate,
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 const Code& stub = 1863 const Code& stub =
1864 Code::Handle(StubCode::GetAllocationStubForClass(cls_)); 1864 Code::Handle(StubCode::GetAllocationStubForClass(cls_));
1865 const ExternalLabel label(stub.EntryPoint()); 1865 const ExternalLabel label(stub.EntryPoint());
1866 1866
1867 LocationSummary* locs = instruction_->locs(); 1867 LocationSummary* locs = instruction_->locs();
1868 locs->live_registers()->Remove(locs->out(0)); 1868 locs->live_registers()->Remove(locs->out(0));
1869 1869
1870 compiler->SaveLiveRegisters(locs); 1870 compiler->SaveLiveRegisters(locs);
1871 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. 1871 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
1872 &label, 1872 &label,
1873 PcDescriptors::kOther, 1873 RawPcDescriptors::kOther,
1874 locs); 1874 locs);
1875 __ MoveRegister(locs->temp(0).reg(), R0); 1875 __ MoveRegister(locs->temp(0).reg(), R0);
1876 compiler->RestoreLiveRegisters(locs); 1876 compiler->RestoreLiveRegisters(locs);
1877 1877
1878 __ b(exit_label()); 1878 __ b(exit_label());
1879 } 1879 }
1880 1880
1881 private: 1881 private:
1882 StoreInstanceFieldInstr* instruction_; 1882 StoreInstanceFieldInstr* instruction_;
1883 const Class& cls_; 1883 const Class& cls_;
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 locs()); 2312 locs());
2313 __ Drop(2); 2313 __ Drop(2);
2314 __ Pop(kResultReg); 2314 __ Pop(kResultReg);
2315 __ Bind(&done); 2315 __ Bind(&done);
2316 return; 2316 return;
2317 } 2317 }
2318 } 2318 }
2319 2319
2320 compiler->GenerateCall(token_pos(), 2320 compiler->GenerateCall(token_pos(),
2321 &StubCode::AllocateArrayLabel(), 2321 &StubCode::AllocateArrayLabel(),
2322 PcDescriptors::kOther, 2322 RawPcDescriptors::kOther,
2323 locs()); 2323 locs());
2324 ASSERT(locs()->out(0).reg() == kResultReg); 2324 ASSERT(locs()->out(0).reg() == kResultReg);
2325 } 2325 }
2326 2326
2327 2327
2328 class BoxDoubleSlowPath : public SlowPathCode { 2328 class BoxDoubleSlowPath : public SlowPathCode {
2329 public: 2329 public:
2330 explicit BoxDoubleSlowPath(Instruction* instruction) 2330 explicit BoxDoubleSlowPath(Instruction* instruction)
2331 : instruction_(instruction) { } 2331 : instruction_(instruction) { }
2332 2332
2333 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { 2333 virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
2334 __ Comment("BoxDoubleSlowPath"); 2334 __ Comment("BoxDoubleSlowPath");
2335 __ Bind(entry_label()); 2335 __ Bind(entry_label());
2336 const Class& double_class = compiler->double_class(); 2336 const Class& double_class = compiler->double_class();
2337 const Code& stub = 2337 const Code& stub =
2338 Code::Handle(StubCode::GetAllocationStubForClass(double_class)); 2338 Code::Handle(StubCode::GetAllocationStubForClass(double_class));
2339 const ExternalLabel label(stub.EntryPoint()); 2339 const ExternalLabel label(stub.EntryPoint());
2340 2340
2341 LocationSummary* locs = instruction_->locs(); 2341 LocationSummary* locs = instruction_->locs();
2342 locs->live_registers()->Remove(locs->out(0)); 2342 locs->live_registers()->Remove(locs->out(0));
2343 2343
2344 compiler->SaveLiveRegisters(locs); 2344 compiler->SaveLiveRegisters(locs);
2345 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. 2345 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
2346 &label, 2346 &label,
2347 PcDescriptors::kOther, 2347 RawPcDescriptors::kOther,
2348 locs); 2348 locs);
2349 __ MoveRegister(locs->out(0).reg(), R0); 2349 __ MoveRegister(locs->out(0).reg(), R0);
2350 compiler->RestoreLiveRegisters(locs); 2350 compiler->RestoreLiveRegisters(locs);
2351 2351
2352 __ b(exit_label()); 2352 __ b(exit_label());
2353 } 2353 }
2354 2354
2355 private: 2355 private:
2356 Instruction* instruction_; 2356 Instruction* instruction_;
2357 }; 2357 };
(...skipping 11 matching lines...) Expand all
2369 const Code& stub = 2369 const Code& stub =
2370 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class)); 2370 Code::Handle(StubCode::GetAllocationStubForClass(float32x4_class));
2371 const ExternalLabel label(stub.EntryPoint()); 2371 const ExternalLabel label(stub.EntryPoint());
2372 2372
2373 LocationSummary* locs = instruction_->locs(); 2373 LocationSummary* locs = instruction_->locs();
2374 locs->live_registers()->Remove(locs->out(0)); 2374 locs->live_registers()->Remove(locs->out(0));
2375 2375
2376 compiler->SaveLiveRegisters(locs); 2376 compiler->SaveLiveRegisters(locs);
2377 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. 2377 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
2378 &label, 2378 &label,
2379 PcDescriptors::kOther, 2379 RawPcDescriptors::kOther,
2380 locs); 2380 locs);
2381 __ mov(locs->out(0).reg(), Operand(R0)); 2381 __ mov(locs->out(0).reg(), Operand(R0));
2382 compiler->RestoreLiveRegisters(locs); 2382 compiler->RestoreLiveRegisters(locs);
2383 2383
2384 __ b(exit_label()); 2384 __ b(exit_label());
2385 } 2385 }
2386 2386
2387 private: 2387 private:
2388 Instruction* instruction_; 2388 Instruction* instruction_;
2389 }; 2389 };
(...skipping 11 matching lines...) Expand all
2401 const Code& stub = 2401 const Code& stub =
2402 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class)); 2402 Code::Handle(StubCode::GetAllocationStubForClass(float64x2_class));
2403 const ExternalLabel label(stub.EntryPoint()); 2403 const ExternalLabel label(stub.EntryPoint());
2404 2404
2405 LocationSummary* locs = instruction_->locs(); 2405 LocationSummary* locs = instruction_->locs();
2406 locs->live_registers()->Remove(locs->out(0)); 2406 locs->live_registers()->Remove(locs->out(0));
2407 2407
2408 compiler->SaveLiveRegisters(locs); 2408 compiler->SaveLiveRegisters(locs);
2409 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. 2409 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
2410 &label, 2410 &label,
2411 PcDescriptors::kOther, 2411 RawPcDescriptors::kOther,
2412 locs); 2412 locs);
2413 __ mov(locs->out(0).reg(), Operand(R0)); 2413 __ mov(locs->out(0).reg(), Operand(R0));
2414 compiler->RestoreLiveRegisters(locs); 2414 compiler->RestoreLiveRegisters(locs);
2415 2415
2416 __ b(exit_label()); 2416 __ b(exit_label());
2417 } 2417 }
2418 2418
2419 private: 2419 private:
2420 Instruction* instruction_; 2420 Instruction* instruction_;
2421 }; 2421 };
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 2686
2687 2687
2688 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2688 void AllocateContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2689 ASSERT(locs()->temp(0).reg() == R1); 2689 ASSERT(locs()->temp(0).reg() == R1);
2690 ASSERT(locs()->out(0).reg() == R0); 2690 ASSERT(locs()->out(0).reg() == R0);
2691 2691
2692 __ LoadImmediate(R1, num_context_variables()); 2692 __ LoadImmediate(R1, num_context_variables());
2693 const ExternalLabel label(StubCode::AllocateContextEntryPoint()); 2693 const ExternalLabel label(StubCode::AllocateContextEntryPoint());
2694 compiler->GenerateCall(token_pos(), 2694 compiler->GenerateCall(token_pos(),
2695 &label, 2695 &label,
2696 PcDescriptors::kOther, 2696 RawPcDescriptors::kOther,
2697 locs()); 2697 locs());
2698 } 2698 }
2699 2699
2700 2700
2701 LocationSummary* CloneContextInstr::MakeLocationSummary(Isolate* isolate, 2701 LocationSummary* CloneContextInstr::MakeLocationSummary(Isolate* isolate,
2702 bool opt) const { 2702 bool opt) const {
2703 const intptr_t kNumInputs = 1; 2703 const intptr_t kNumInputs = 1;
2704 const intptr_t kNumTemps = 0; 2704 const intptr_t kNumTemps = 0;
2705 LocationSummary* locs = new(isolate) LocationSummary( 2705 LocationSummary* locs = new(isolate) LocationSummary(
2706 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); 2706 isolate, kNumInputs, kNumTemps, LocationSummary::kCall);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); 2801 Environment* env = compiler->SlowPathEnvironmentFor(instruction_);
2802 compiler->pending_deoptimization_env_ = env; 2802 compiler->pending_deoptimization_env_ = env;
2803 compiler->GenerateRuntimeCall(instruction_->token_pos(), 2803 compiler->GenerateRuntimeCall(instruction_->token_pos(),
2804 instruction_->deopt_id(), 2804 instruction_->deopt_id(),
2805 kStackOverflowRuntimeEntry, 2805 kStackOverflowRuntimeEntry,
2806 0, 2806 0,
2807 instruction_->locs()); 2807 instruction_->locs());
2808 2808
2809 if (FLAG_use_osr && !compiler->is_optimizing() && instruction_->in_loop()) { 2809 if (FLAG_use_osr && !compiler->is_optimizing() && instruction_->in_loop()) {
2810 // In unoptimized code, record loop stack checks as possible OSR entries. 2810 // In unoptimized code, record loop stack checks as possible OSR entries.
2811 compiler->AddCurrentDescriptor(PcDescriptors::kOsrEntry, 2811 compiler->AddCurrentDescriptor(RawPcDescriptors::kOsrEntry,
2812 instruction_->deopt_id(), 2812 instruction_->deopt_id(),
2813 0); // No token position. 2813 0); // No token position.
2814 } 2814 }
2815 compiler->pending_deoptimization_env_ = NULL; 2815 compiler->pending_deoptimization_env_ = NULL;
2816 compiler->RestoreLiveRegisters(instruction_->locs()); 2816 compiler->RestoreLiveRegisters(instruction_->locs());
2817 __ b(exit_label()); 2817 __ b(exit_label());
2818 } 2818 }
2819 2819
2820 Label* osr_entry_label() { 2820 Label* osr_entry_label() {
2821 ASSERT(FLAG_use_osr); 2821 ASSERT(FLAG_use_osr);
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
3637 const Code& stub = 3637 const Code& stub =
3638 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class)); 3638 Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class));
3639 const ExternalLabel label(stub.EntryPoint()); 3639 const ExternalLabel label(stub.EntryPoint());
3640 3640
3641 LocationSummary* locs = instruction_->locs(); 3641 LocationSummary* locs = instruction_->locs();
3642 locs->live_registers()->Remove(locs->out(0)); 3642 locs->live_registers()->Remove(locs->out(0));
3643 3643
3644 compiler->SaveLiveRegisters(locs); 3644 compiler->SaveLiveRegisters(locs);
3645 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. 3645 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
3646 &label, 3646 &label,
3647 PcDescriptors::kOther, 3647 RawPcDescriptors::kOther,
3648 locs); 3648 locs);
3649 __ mov(locs->out(0).reg(), Operand(R0)); 3649 __ mov(locs->out(0).reg(), Operand(R0));
3650 compiler->RestoreLiveRegisters(locs); 3650 compiler->RestoreLiveRegisters(locs);
3651 3651
3652 __ b(exit_label()); 3652 __ b(exit_label());
3653 } 3653 }
3654 3654
3655 private: 3655 private:
3656 BoxInt32x4Instr* instruction_; 3656 BoxInt32x4Instr* instruction_;
3657 }; 3657 };
(...skipping 2199 matching lines...) Expand 10 before | Expand all | Expand 10 after
5857 const Code& stub = 5857 const Code& stub =
5858 Code::Handle(StubCode::GetAllocationStubForClass(mint_class)); 5858 Code::Handle(StubCode::GetAllocationStubForClass(mint_class));
5859 const ExternalLabel label(stub.EntryPoint()); 5859 const ExternalLabel label(stub.EntryPoint());
5860 5860
5861 LocationSummary* locs = instruction_->locs(); 5861 LocationSummary* locs = instruction_->locs();
5862 locs->live_registers()->Remove(locs->out(0)); 5862 locs->live_registers()->Remove(locs->out(0));
5863 5863
5864 compiler->SaveLiveRegisters(locs); 5864 compiler->SaveLiveRegisters(locs);
5865 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position. 5865 compiler->GenerateCall(Scanner::kNoSourcePos, // No token position.
5866 &label, 5866 &label,
5867 PcDescriptors::kOther, 5867 RawPcDescriptors::kOther,
5868 locs); 5868 locs);
5869 __ mov(locs->out(0).reg(), Operand(R0)); 5869 __ mov(locs->out(0).reg(), Operand(R0));
5870 compiler->RestoreLiveRegisters(locs); 5870 compiler->RestoreLiveRegisters(locs);
5871 5871
5872 __ b(exit_label()); 5872 __ b(exit_label());
5873 } 5873 }
5874 5874
5875 private: 5875 private:
5876 BoxIntegerInstr* instruction_; 5876 BoxIntegerInstr* instruction_;
5877 }; 5877 };
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
6190 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6190 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6191 __ Bind(compiler->GetJumpLabel(this)); 6191 __ Bind(compiler->GetJumpLabel(this));
6192 if (!compiler->is_optimizing()) { 6192 if (!compiler->is_optimizing()) {
6193 if (compiler->NeedsEdgeCounter(this)) { 6193 if (compiler->NeedsEdgeCounter(this)) {
6194 compiler->EmitEdgeCounter(); 6194 compiler->EmitEdgeCounter();
6195 } 6195 }
6196 // Add an edge counter. 6196 // Add an edge counter.
6197 // On ARM the deoptimization descriptor points after the edge counter 6197 // On ARM the deoptimization descriptor points after the edge counter
6198 // code so that we can reuse the same pattern matching code as at call 6198 // code so that we can reuse the same pattern matching code as at call
6199 // sites, which matches backwards from the end of the pattern. 6199 // sites, which matches backwards from the end of the pattern.
6200 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 6200 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
6201 deopt_id_, 6201 deopt_id_,
6202 Scanner::kNoSourcePos); 6202 Scanner::kNoSourcePos);
6203 } 6203 }
6204 if (HasParallelMove()) { 6204 if (HasParallelMove()) {
6205 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 6205 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
6206 } 6206 }
6207 } 6207 }
6208 6208
6209 6209
6210 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, 6210 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate,
6211 bool opt) const { 6211 bool opt) const {
6212 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); 6212 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall);
6213 } 6213 }
6214 6214
6215 6215
6216 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6216 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6217 if (!compiler->is_optimizing()) { 6217 if (!compiler->is_optimizing()) {
6218 if (FLAG_emit_edge_counters) { 6218 if (FLAG_emit_edge_counters) {
6219 compiler->EmitEdgeCounter(); 6219 compiler->EmitEdgeCounter();
6220 } 6220 }
6221 // Add a deoptimization descriptor for deoptimizing instructions that 6221 // Add a deoptimization descriptor for deoptimizing instructions that
6222 // may be inserted before this instruction. On ARM this descriptor 6222 // may be inserted before this instruction. On ARM this descriptor
6223 // points after the edge counter code so that we can reuse the same 6223 // points after the edge counter code so that we can reuse the same
6224 // pattern matching code as at call sites, which matches backwards from 6224 // pattern matching code as at call sites, which matches backwards from
6225 // the end of the pattern. 6225 // the end of the pattern.
6226 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 6226 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
6227 GetDeoptId(), 6227 GetDeoptId(),
6228 Scanner::kNoSourcePos); 6228 Scanner::kNoSourcePos);
6229 } 6229 }
6230 if (HasParallelMove()) { 6230 if (HasParallelMove()) {
6231 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 6231 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
6232 } 6232 }
6233 6233
6234 // We can fall through if the successor is the next block in the list. 6234 // We can fall through if the successor is the next block in the list.
6235 // Otherwise, we need a jump. 6235 // Otherwise, we need a jump.
6236 if (!compiler->CanFallThroughTo(successor())) { 6236 if (!compiler->CanFallThroughTo(successor())) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
6350 bool opt) const { 6350 bool opt) const {
6351 return MakeCallSummary(); 6351 return MakeCallSummary();
6352 } 6352 }
6353 6353
6354 6354
6355 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6355 void AllocateObjectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6356 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls())); 6356 const Code& stub = Code::Handle(StubCode::GetAllocationStubForClass(cls()));
6357 const ExternalLabel label(stub.EntryPoint()); 6357 const ExternalLabel label(stub.EntryPoint());
6358 compiler->GenerateCall(token_pos(), 6358 compiler->GenerateCall(token_pos(),
6359 &label, 6359 &label,
6360 PcDescriptors::kOther, 6360 RawPcDescriptors::kOther,
6361 locs()); 6361 locs());
6362 __ Drop(ArgumentCount()); // Discard arguments. 6362 __ Drop(ArgumentCount()); // Discard arguments.
6363 } 6363 }
6364 6364
6365 6365
6366 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6366 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6367 ASSERT(!compiler->is_optimizing()); 6367 ASSERT(!compiler->is_optimizing());
6368 const ExternalLabel label(StubCode::DebugStepCheckEntryPoint()); 6368 const ExternalLabel label(StubCode::DebugStepCheckEntryPoint());
6369 __ LoadImmediate(R4, 0); 6369 __ LoadImmediate(R4, 0);
6370 __ LoadImmediate(R5, 0); 6370 __ LoadImmediate(R5, 0);
6371 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 6371 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
6372 #if defined(DEBUG) 6372 #if defined(DEBUG)
6373 __ LoadImmediate(R4, kInvalidObjectPointer); 6373 __ LoadImmediate(R4, kInvalidObjectPointer);
6374 __ LoadImmediate(R5, kInvalidObjectPointer); 6374 __ LoadImmediate(R5, kInvalidObjectPointer);
6375 #endif 6375 #endif
6376 } 6376 }
6377 6377
6378 } // namespace dart 6378 } // namespace dart
6379 6379
6380 #endif // defined TARGET_ARCH_ARM 6380 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698