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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/ia32/full-codegen-ia32.cc ('k') | src/mips/code-stubs-mips.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 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 6412 matching lines...) Expand 10 before | Expand all | Expand 10 after
6423 if (instr->hydrogen()->is_function_entry()) { 6423 if (instr->hydrogen()->is_function_entry()) {
6424 // Perform stack overflow check. 6424 // Perform stack overflow check.
6425 Label done; 6425 Label done;
6426 ExternalReference stack_limit = 6426 ExternalReference stack_limit =
6427 ExternalReference::address_of_stack_limit(isolate()); 6427 ExternalReference::address_of_stack_limit(isolate());
6428 __ cmp(esp, Operand::StaticVariable(stack_limit)); 6428 __ cmp(esp, Operand::StaticVariable(stack_limit));
6429 __ j(above_equal, &done, Label::kNear); 6429 __ j(above_equal, &done, Label::kNear);
6430 6430
6431 ASSERT(instr->context()->IsRegister()); 6431 ASSERT(instr->context()->IsRegister());
6432 ASSERT(ToRegister(instr->context()).is(esi)); 6432 ASSERT(ToRegister(instr->context()).is(esi));
6433 StackCheckStub stub; 6433 CallCode(isolate()->builtins()->StackCheck(),
6434 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 6434 RelocInfo::CODE_TARGET,
6435 instr);
6435 EnsureSpaceForLazyDeopt(); 6436 EnsureSpaceForLazyDeopt();
6436 __ bind(&done); 6437 __ bind(&done);
6437 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); 6438 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
6438 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 6439 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
6439 } else { 6440 } else {
6440 ASSERT(instr->hydrogen()->is_backwards_branch()); 6441 ASSERT(instr->hydrogen()->is_backwards_branch());
6441 // Perform stack overflow check if this goto needs it before jumping. 6442 // Perform stack overflow check if this goto needs it before jumping.
6442 DeferredStackCheck* deferred_stack_check = 6443 DeferredStackCheck* deferred_stack_check =
6443 new(zone()) DeferredStackCheck(this, instr); 6444 new(zone()) DeferredStackCheck(this, instr);
6444 ExternalReference stack_limit = 6445 ExternalReference stack_limit =
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
6558 FixedArray::kHeaderSize - kPointerSize)); 6559 FixedArray::kHeaderSize - kPointerSize));
6559 __ bind(&done); 6560 __ bind(&done);
6560 } 6561 }
6561 6562
6562 6563
6563 #undef __ 6564 #undef __
6564 6565
6565 } } // namespace v8::internal 6566 } } // namespace v8::internal
6566 6567
6567 #endif // V8_TARGET_ARCH_IA32 6568 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698