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

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 2207533002: [turbofan] Remove IfExceptionHint from exception projections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compilation-dependencies.h" 6 #include "src/compilation-dependencies.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 NodeProperties::ReplaceUses(node_, node_, node_, node_, n); 331 NodeProperties::ReplaceUses(node_, node_, node_, node_, n);
332 update_effect(n); 332 update_effect(n);
333 return n; 333 return n;
334 } 334 }
335 335
336 void ConvertBothInputsToNumber(Node** left_result, Node** right_result) { 336 void ConvertBothInputsToNumber(Node** left_result, Node** right_result) {
337 Node* projections[2]; 337 Node* projections[2];
338 338
339 // Find {IfSuccess} and {IfException} continuations of the operation. 339 // Find {IfSuccess} and {IfException} continuations of the operation.
340 NodeProperties::CollectControlProjections(node_, projections, 2); 340 NodeProperties::CollectControlProjections(node_, projections, 2);
341 IfExceptionHint hint = OpParameter<IfExceptionHint>(projections[1]);
342 Node* if_exception = projections[1]; 341 Node* if_exception = projections[1];
343 Node* if_success = projections[0]; 342 Node* if_success = projections[0];
344 343
345 // Insert two ToNumber() operations that both potentially throw. 344 // Insert two ToNumber() operations that both potentially throw.
346 Node* left_state = CreateFrameStateForLeftInput(); 345 Node* left_state = CreateFrameStateForLeftInput();
347 Node* left_conv = 346 Node* left_conv =
348 graph()->NewNode(javascript()->ToNumber(), left(), context(), 347 graph()->NewNode(javascript()->ToNumber(), left(), context(),
349 left_state, effect(), control()); 348 left_state, effect(), control());
350 Node* left_success = graph()->NewNode(common()->IfSuccess(), left_conv); 349 Node* left_success = graph()->NewNode(common()->IfSuccess(), left_conv);
351 Node* right_state = CreateFrameStateForRightInput(left_conv); 350 Node* right_state = CreateFrameStateForRightInput(left_conv);
352 Node* right_conv = 351 Node* right_conv =
353 graph()->NewNode(javascript()->ToNumber(), right(), context(), 352 graph()->NewNode(javascript()->ToNumber(), right(), context(),
354 right_state, left_conv, left_success); 353 right_state, left_conv, left_success);
355 Node* left_exception = 354 Node* left_exception =
356 graph()->NewNode(common()->IfException(hint), left_conv, left_conv); 355 graph()->NewNode(common()->IfException(), left_conv, left_conv);
357 Node* right_exception = 356 Node* right_exception =
358 graph()->NewNode(common()->IfException(hint), right_conv, right_conv); 357 graph()->NewNode(common()->IfException(), right_conv, right_conv);
359 NodeProperties::ReplaceControlInput(if_success, right_conv); 358 NodeProperties::ReplaceControlInput(if_success, right_conv);
360 update_effect(right_conv); 359 update_effect(right_conv);
361 360
362 // Wire conversions to existing {IfException} continuation. 361 // Wire conversions to existing {IfException} continuation.
363 Node* exception_merge = if_exception; 362 Node* exception_merge = if_exception;
364 Node* exception_value = 363 Node* exception_value =
365 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), 364 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2),
366 left_exception, right_exception, exception_merge); 365 left_exception, right_exception, exception_merge);
367 Node* exception_effect = 366 Node* exception_effect =
368 graph()->NewNode(common()->EffectPhi(2), left_exception, 367 graph()->NewNode(common()->EffectPhi(2), left_exception,
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 } 2152 }
2154 2153
2155 2154
2156 CompilationDependencies* JSTypedLowering::dependencies() const { 2155 CompilationDependencies* JSTypedLowering::dependencies() const {
2157 return dependencies_; 2156 return dependencies_;
2158 } 2157 }
2159 2158
2160 } // namespace compiler 2159 } // namespace compiler
2161 } // namespace internal 2160 } // namespace internal
2162 } // namespace v8 2161 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698