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

Side by Side Diff: src/compiler/interpreter-assembler.cc

Issue 1671653002: [Interpreter] Ensure StackCheck bytecode handler is in split-edge form. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove Fallthrough from RMA Created 4 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/interpreter-assembler.h" 5 #include "src/compiler/interpreter-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 Node* args[] = { GetAccumulator(), 700 Node* args[] = { GetAccumulator(),
701 RegisterFileRawPointer(), 701 RegisterFileRawPointer(),
702 new_bytecode_offset, 702 new_bytecode_offset,
703 BytecodeArrayTaggedPointer(), 703 BytecodeArrayTaggedPointer(),
704 DispatchTableRawPointer(), 704 DispatchTableRawPointer(),
705 GetContext() }; 705 GetContext() };
706 raw_assembler_->TailCallN(call_descriptor(), target_code_object, args); 706 raw_assembler_->TailCallN(call_descriptor(), target_code_object, args);
707 } 707 }
708 708
709 void InterpreterAssembler::StackCheck() { 709 void InterpreterAssembler::StackCheck() {
710 RawMachineLabel ok, stack_guard; 710 RawMachineLabel end, ok, stack_guard;
711 Node* sp = raw_assembler_->LoadStackPointer(); 711 Node* sp = raw_assembler_->LoadStackPointer();
712 Node* stack_limit = raw_assembler_->Load( 712 Node* stack_limit = raw_assembler_->Load(
713 MachineType::Pointer(), 713 MachineType::Pointer(),
714 raw_assembler_->ExternalConstant( 714 raw_assembler_->ExternalConstant(
715 ExternalReference::address_of_stack_limit(isolate()))); 715 ExternalReference::address_of_stack_limit(isolate())));
716 Node* condition = raw_assembler_->UintPtrGreaterThanOrEqual(sp, stack_limit); 716 Node* condition = raw_assembler_->UintPtrGreaterThanOrEqual(sp, stack_limit);
717 raw_assembler_->Branch(condition, &ok, &stack_guard); 717 raw_assembler_->Branch(condition, &ok, &stack_guard);
718 raw_assembler_->Bind(&stack_guard); 718 raw_assembler_->Bind(&stack_guard);
719 CallRuntime(Runtime::kStackGuard); 719 CallRuntime(Runtime::kStackGuard);
720 raw_assembler_->Goto(&ok); 720 raw_assembler_->Goto(&end);
721 raw_assembler_->Bind(&ok); 721 raw_assembler_->Bind(&ok);
722 raw_assembler_->Goto(&end);
723 raw_assembler_->Bind(&end);
722 } 724 }
723 725
724 void InterpreterAssembler::Abort(BailoutReason bailout_reason) { 726 void InterpreterAssembler::Abort(BailoutReason bailout_reason) {
725 Node* abort_id = SmiTag(Int32Constant(bailout_reason)); 727 Node* abort_id = SmiTag(Int32Constant(bailout_reason));
726 Node* ret_value = CallRuntime(Runtime::kAbort, abort_id); 728 Node* ret_value = CallRuntime(Runtime::kAbort, abort_id);
727 // Unreached, but keeps turbofan happy. 729 // Unreached, but keeps turbofan happy.
728 raw_assembler_->Return(ret_value); 730 raw_assembler_->Return(ret_value);
729 } 731 }
730 732
731 733
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 return raw_assembler_->call_descriptor(); 771 return raw_assembler_->call_descriptor();
770 } 772 }
771 773
772 774
773 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } 775 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); }
774 776
775 777
776 } // namespace compiler 778 } // namespace compiler
777 } // namespace internal 779 } // namespace internal
778 } // namespace v8 780 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698