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

Side by Side Diff: src/compiler/raw-machine-assembler.cc

Issue 2247353005: [builtins] support exception handling in TFJ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 4 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 | « src/compiler/raw-machine-assembler.h ('k') | src/isolate.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/raw-machine-assembler.h" 5 #include "src/compiler/raw-machine-assembler.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/compiler/scheduler.h" 10 #include "src/compiler/scheduler.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 79
80 void RawMachineAssembler::Branch(Node* condition, RawMachineLabel* true_val, 80 void RawMachineAssembler::Branch(Node* condition, RawMachineLabel* true_val,
81 RawMachineLabel* false_val) { 81 RawMachineLabel* false_val) {
82 DCHECK(current_block_ != schedule()->end()); 82 DCHECK(current_block_ != schedule()->end());
83 Node* branch = MakeNode(common()->Branch(), 1, &condition); 83 Node* branch = MakeNode(common()->Branch(), 1, &condition);
84 schedule()->AddBranch(CurrentBlock(), branch, Use(true_val), Use(false_val)); 84 schedule()->AddBranch(CurrentBlock(), branch, Use(true_val), Use(false_val));
85 current_block_ = nullptr; 85 current_block_ = nullptr;
86 } 86 }
87 87
88 void RawMachineAssembler::Continuations(Node* call, RawMachineLabel* if_success,
89 RawMachineLabel* if_exception) {
90 DCHECK_NOT_NULL(schedule_);
91 DCHECK_NOT_NULL(current_block_);
92 schedule()->AddCall(CurrentBlock(), call, Use(if_success), Use(if_exception));
93 current_block_ = nullptr;
94 }
95
88 void RawMachineAssembler::Switch(Node* index, RawMachineLabel* default_label, 96 void RawMachineAssembler::Switch(Node* index, RawMachineLabel* default_label,
89 const int32_t* case_values, 97 const int32_t* case_values,
90 RawMachineLabel** case_labels, 98 RawMachineLabel** case_labels,
91 size_t case_count) { 99 size_t case_count) {
92 DCHECK_NE(schedule()->end(), current_block_); 100 DCHECK_NE(schedule()->end(), current_block_);
93 size_t succ_count = case_count + 1; 101 size_t succ_count = case_count + 1;
94 Node* switch_node = AddNode(common()->Switch(succ_count), index); 102 Node* switch_node = AddNode(common()->Switch(succ_count), index);
95 BasicBlock** succ_blocks = zone()->NewArray<BasicBlock*>(succ_count); 103 BasicBlock** succ_blocks = zone()->NewArray<BasicBlock*>(succ_count);
96 for (size_t index = 0; index < case_count; ++index) { 104 for (size_t index = 0; index < case_count; ++index) {
97 int32_t case_value = case_values[index]; 105 int32_t case_value = case_values[index];
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // The raw machine assembler nodes do not have effect and control inputs, 520 // The raw machine assembler nodes do not have effect and control inputs,
513 // so we disable checking input counts here. 521 // so we disable checking input counts here.
514 return graph()->NewNodeUnchecked(op, input_count, inputs); 522 return graph()->NewNodeUnchecked(op, input_count, inputs);
515 } 523 }
516 524
517 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } 525 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); }
518 526
519 } // namespace compiler 527 } // namespace compiler
520 } // namespace internal 528 } // namespace internal
521 } // namespace v8 529 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698