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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 23480013: Turn interrupt and stack check into builtins. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix mips Created 7 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 | « src/arm/full-codegen-arm.cc ('k') | src/builtins.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5625 matching lines...) Expand 10 before | Expand all | Expand 10 after
5636 ASSERT(instr->HasEnvironment()); 5636 ASSERT(instr->HasEnvironment());
5637 LEnvironment* env = instr->environment(); 5637 LEnvironment* env = instr->environment();
5638 // There is no LLazyBailout instruction for stack-checks. We have to 5638 // There is no LLazyBailout instruction for stack-checks. We have to
5639 // prepare for lazy deoptimization explicitly here. 5639 // prepare for lazy deoptimization explicitly here.
5640 if (instr->hydrogen()->is_function_entry()) { 5640 if (instr->hydrogen()->is_function_entry()) {
5641 // Perform stack overflow check. 5641 // Perform stack overflow check.
5642 Label done; 5642 Label done;
5643 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 5643 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
5644 __ cmp(sp, Operand(ip)); 5644 __ cmp(sp, Operand(ip));
5645 __ b(hs, &done); 5645 __ b(hs, &done);
5646 StackCheckStub stub;
5647 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); 5646 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize);
5648 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 5647 CallCode(isolate()->builtins()->StackCheck(),
5648 RelocInfo::CODE_TARGET,
5649 instr);
5649 EnsureSpaceForLazyDeopt(); 5650 EnsureSpaceForLazyDeopt();
5650 last_lazy_deopt_pc_ = masm()->pc_offset(); 5651 last_lazy_deopt_pc_ = masm()->pc_offset();
5651 __ bind(&done); 5652 __ bind(&done);
5652 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 5653 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
5653 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5654 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5654 } else { 5655 } else {
5655 ASSERT(instr->hydrogen()->is_backwards_branch()); 5656 ASSERT(instr->hydrogen()->is_backwards_branch());
5656 // Perform stack overflow check if this goto needs it before jumping. 5657 // Perform stack overflow check if this goto needs it before jumping.
5657 DeferredStackCheck* deferred_stack_check = 5658 DeferredStackCheck* deferred_stack_check =
5658 new(zone()) DeferredStackCheck(this, instr); 5659 new(zone()) DeferredStackCheck(this, instr);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
5778 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5779 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5779 __ ldr(result, FieldMemOperand(scratch, 5780 __ ldr(result, FieldMemOperand(scratch,
5780 FixedArray::kHeaderSize - kPointerSize)); 5781 FixedArray::kHeaderSize - kPointerSize));
5781 __ bind(&done); 5782 __ bind(&done);
5782 } 5783 }
5783 5784
5784 5785
5785 #undef __ 5786 #undef __
5786 5787
5787 } } // namespace v8::internal 5788 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698