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

Side by Side Diff: src/compiler/code-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/code-assembler.h ('k') | src/compiler/raw-machine-assembler.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 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/code-assembler.h" 5 #include "src/compiler/code-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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 void CodeAssembler::BranchIf(Node* condition, Label* if_true, Label* if_false) { 306 void CodeAssembler::BranchIf(Node* condition, Label* if_true, Label* if_false) {
307 Label if_condition_is_true(this), if_condition_is_false(this); 307 Label if_condition_is_true(this), if_condition_is_false(this);
308 Branch(condition, &if_condition_is_true, &if_condition_is_false); 308 Branch(condition, &if_condition_is_true, &if_condition_is_false);
309 Bind(&if_condition_is_true); 309 Bind(&if_condition_is_true);
310 Goto(if_true); 310 Goto(if_true);
311 Bind(&if_condition_is_false); 311 Bind(&if_condition_is_false);
312 Goto(if_false); 312 Goto(if_false);
313 } 313 }
314 314
315 void CodeAssembler::GotoIfException(Node* node, Label* if_exception,
316 Variable* exception_var) {
317 Label success(this), exception(this, Label::kDeferred);
318 success.MergeVariables();
319 exception.MergeVariables();
320 DCHECK(!node->op()->HasProperty(Operator::kNoThrow));
321
322 raw_assembler_->Continuations(node, success.label_, exception.label_);
323
324 Bind(&exception);
325 const Operator* op = raw_assembler_->common()->IfException();
326 Node* exception_value = raw_assembler_->AddNode(op, node, node);
327 if (exception_var != nullptr) {
328 exception_var->Bind(exception_value);
329 }
330 Goto(if_exception);
331
332 Bind(&success);
333 }
334
315 Node* CodeAssembler::CallN(CallDescriptor* descriptor, Node* code_target, 335 Node* CodeAssembler::CallN(CallDescriptor* descriptor, Node* code_target,
316 Node** args) { 336 Node** args) {
317 CallPrologue(); 337 CallPrologue();
318 Node* return_value = raw_assembler_->CallN(descriptor, code_target, args); 338 Node* return_value = raw_assembler_->CallN(descriptor, code_target, args);
319 CallEpilogue(); 339 CallEpilogue();
320 return return_value; 340 return return_value;
321 } 341 }
322 342
323 Node* CodeAssembler::TailCallN(CallDescriptor* descriptor, Node* code_target, 343 Node* CodeAssembler::TailCallN(CallDescriptor* descriptor, Node* code_target,
324 Node** args) { 344 Node** args) {
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } 1072 }
1053 } 1073 }
1054 } 1074 }
1055 1075
1056 bound_ = true; 1076 bound_ = true;
1057 } 1077 }
1058 1078
1059 } // namespace compiler 1079 } // namespace compiler
1060 } // namespace internal 1080 } // namespace internal
1061 } // namespace v8 1081 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698