Commit 02961377 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

Consistent names for (real) jslimit external references

Previously these were called (real) stack limit on one end, (real)
jslimit on the other. With this CL we consistently use jslimit
everywhere.

Tbr: tebbi@chromium.org
Bug: v8:9534
Change-Id: I9f86ac113bb9682544c365d54f666c1312a073a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1748738
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63179}
parent beff3941
......@@ -72,7 +72,7 @@ void Generate_StackOverflowCheck(MacroAssembler* masm, Register num_args,
// interruptions (e.g. debug break and preemption) here, so the "real stack
// limit" is checked.
ExternalReference real_stack_limit =
ExternalReference::address_of_real_stack_limit(masm->isolate());
ExternalReference::address_of_real_jslimit(masm->isolate());
// Compute the space that is left as a negative number in scratch. If
// we already overflowed, this will be a positive number.
__ mov(scratch, __ ExternalReferenceAsOperand(real_stack_limit, scratch));
......
......@@ -13898,9 +13898,9 @@ void CodeStubAssembler::Print(const char* prefix, Node* tagged_value) {
void CodeStubAssembler::PerformStackCheck(TNode<Context> context) {
Label ok(this), stack_check_interrupt(this, Label::kDeferred);
TNode<UintPtrT> stack_limit = UncheckedCast<UintPtrT>(Load(
MachineType::Pointer(),
ExternalConstant(ExternalReference::address_of_stack_limit(isolate()))));
TNode<UintPtrT> stack_limit = UncheckedCast<UintPtrT>(
Load(MachineType::Pointer(),
ExternalConstant(ExternalReference::address_of_jslimit(isolate()))));
TNode<BoolT> sp_within_limit = StackPointerGreaterThan(stack_limit);
Branch(sp_within_limit, &ok, &stack_check_interrupt);
......
......@@ -328,12 +328,11 @@ ExternalReference ExternalReference::allocation_sites_list_address(
return ExternalReference(isolate->heap()->allocation_sites_list_address());
}
ExternalReference ExternalReference::address_of_stack_limit(Isolate* isolate) {
ExternalReference ExternalReference::address_of_jslimit(Isolate* isolate) {
return ExternalReference(isolate->stack_guard()->address_of_jslimit());
}
ExternalReference ExternalReference::address_of_real_stack_limit(
Isolate* isolate) {
ExternalReference ExternalReference::address_of_real_jslimit(Isolate* isolate) {
return ExternalReference(isolate->stack_guard()->address_of_real_jslimit());
}
......
......@@ -36,8 +36,8 @@ class StatsCounter;
V(force_slow_path, "Isolate::force_slow_path_address()") \
V(isolate_root, "Isolate::isolate_root()") \
V(allocation_sites_list_address, "Heap::allocation_sites_list_address()") \
V(address_of_stack_limit, "StackGuard::address_of_jslimit()") \
V(address_of_real_stack_limit, "StackGuard::address_of_real_jslimit()") \
V(address_of_jslimit, "StackGuard::address_of_jslimit()") \
V(address_of_real_jslimit, "StackGuard::address_of_real_jslimit()") \
V(store_buffer_top, "store_buffer_top") \
V(heap_is_marking_flag_address, "heap_is_marking_flag_address") \
V(new_space_allocation_top_address, "Heap::NewSpaceAllocationTopAddress()") \
......
......@@ -97,7 +97,7 @@ void TurboAssembler::CompareRealStackLimit(Register with) {
} else {
DCHECK(!options().isolate_independent_code);
ExternalReference ref =
ExternalReference::address_of_real_stack_limit(isolate());
ExternalReference::address_of_real_jslimit(isolate());
cmp(with, Operand(ref.address(), RelocInfo::EXTERNAL_REFERENCE));
}
}
......
......@@ -823,11 +823,11 @@ void JSGenericLowering::LowerJSStackCheck(Node* node) {
Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node);
Node* limit = effect = graph()->NewNode(
machine()->Load(MachineType::Pointer()),
jsgraph()->ExternalConstant(
ExternalReference::address_of_stack_limit(isolate())),
jsgraph()->IntPtrConstant(0), effect, control);
Node* limit = effect =
graph()->NewNode(machine()->Load(MachineType::Pointer()),
jsgraph()->ExternalConstant(
ExternalReference::address_of_jslimit(isolate())),
jsgraph()->IntPtrConstant(0), effect, control);
Node* check = graph()->NewNode(machine()->StackPointerGreaterThan(), limit);
Node* branch =
......
......@@ -647,7 +647,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ mov(r0, Operand(stack_limit));
__ ldr(r0, MemOperand(r0));
__ sub(r0, sp, r0, SetCC);
......@@ -1197,7 +1197,7 @@ void RegExpMacroAssemblerARM::Pop(Register target) {
void RegExpMacroAssemblerARM::CheckPreemption() {
// Check for preemption.
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ mov(r0, Operand(stack_limit));
__ ldr(r0, MemOperand(r0));
__ cmp(sp, r0);
......
......@@ -750,7 +750,7 @@ Handle<HeapObject> RegExpMacroAssemblerARM64::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ Mov(x10, stack_limit);
__ Ldr(x10, MemOperand(x10));
__ Subs(x10, sp, x10);
......@@ -1452,7 +1452,7 @@ void RegExpMacroAssemblerARM64::CompareAndBranchOrBacktrack(Register reg,
void RegExpMacroAssemblerARM64::CheckPreemption() {
// Check for preemption.
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ Mov(x10, stack_limit);
__ Ldr(x10, MemOperand(x10));
__ Cmp(sp, x10);
......
......@@ -684,7 +684,7 @@ Handle<HeapObject> RegExpMacroAssemblerIA32::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ mov(ecx, esp);
__ sub(ecx, StaticVariable(stack_limit));
// Handle it if the stack pointer is already below the stack limit.
......@@ -1218,7 +1218,7 @@ void RegExpMacroAssemblerIA32::CheckPreemption() {
// Check for preemption.
Label no_preempt;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ cmp(esp, StaticVariable(stack_limit));
__ j(above, &no_preempt);
......
......@@ -647,7 +647,7 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(masm_->isolate());
ExternalReference::address_of_jslimit(masm_->isolate());
__ li(a0, Operand(stack_limit));
__ lw(a0, MemOperand(a0));
__ Subu(a0, sp, a0);
......@@ -1271,7 +1271,7 @@ void RegExpMacroAssemblerMIPS::Pop(Register target) {
void RegExpMacroAssemblerMIPS::CheckPreemption() {
// Check for preemption.
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(masm_->isolate());
ExternalReference::address_of_jslimit(masm_->isolate());
__ li(a0, Operand(stack_limit));
__ lw(a0, MemOperand(a0));
SafeCall(&check_preempt_label_, ls, sp, Operand(a0));
......
......@@ -683,7 +683,7 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(masm_->isolate());
ExternalReference::address_of_jslimit(masm_->isolate());
__ li(a0, Operand(stack_limit));
__ Ld(a0, MemOperand(a0));
__ Dsubu(a0, sp, a0);
......@@ -1309,7 +1309,7 @@ void RegExpMacroAssemblerMIPS::Pop(Register target) {
void RegExpMacroAssemblerMIPS::CheckPreemption() {
// Check for preemption.
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(masm_->isolate());
ExternalReference::address_of_jslimit(masm_->isolate());
__ li(a0, Operand(stack_limit));
__ Ld(a0, MemOperand(a0));
SafeCall(&check_preempt_label_, ls, sp, Operand(a0));
......
......@@ -689,7 +689,7 @@ Handle<HeapObject> RegExpMacroAssemblerPPC::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ mov(r3, Operand(stack_limit));
__ LoadP(r3, MemOperand(r3));
__ sub(r3, sp, r3, LeaveOE, SetRC);
......@@ -1272,7 +1272,7 @@ void RegExpMacroAssemblerPPC::Pop(Register target) {
void RegExpMacroAssemblerPPC::CheckPreemption() {
// Check for preemption.
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ mov(r3, Operand(stack_limit));
__ LoadP(r3, MemOperand(r3));
__ cmpl(sp, r3);
......
......@@ -663,7 +663,7 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ mov(r2, Operand(stack_limit));
__ LoadP(r2, MemOperand(r2));
__ SubP(r2, sp, r2);
......@@ -1213,7 +1213,7 @@ void RegExpMacroAssemblerS390::Pop(Register target) {
void RegExpMacroAssemblerS390::CheckPreemption() {
// Check for preemption.
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ mov(r2, Operand(stack_limit));
__ CmpLogicalP(sp, MemOperand(r2));
SafeCall(&check_preempt_label_, le);
......
......@@ -721,7 +721,7 @@ Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) {
Label stack_ok;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ movq(rcx, rsp);
__ Move(kScratchRegister, stack_limit);
__ subq(rcx, Operand(kScratchRegister, 0));
......@@ -1322,7 +1322,7 @@ void RegExpMacroAssemblerX64::CheckPreemption() {
// Check for preemption.
Label no_preempt;
ExternalReference stack_limit =
ExternalReference::address_of_stack_limit(isolate());
ExternalReference::address_of_jslimit(isolate());
__ load_rax(stack_limit);
__ cmpq(rsp, rax);
__ j(above, &no_preempt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment