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

Side by Side Diff: src/compiler/js-frame-specialization.cc

Issue 2384113002: [turbofan] Osr value typing + dynamic type checks on entry. (Closed)
Patch Set: Fix liveness block Created 4 years, 2 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/instruction-selector.cc ('k') | src/compiler/node-properties.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 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/js-frame-specialization.h" 5 #include "src/compiler/js-frame-specialization.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 10
(...skipping 10 matching lines...) Expand all
21 default: 21 default:
22 break; 22 break;
23 } 23 }
24 return NoChange(); 24 return NoChange();
25 } 25 }
26 26
27 27
28 Reduction JSFrameSpecialization::ReduceOsrValue(Node* node) { 28 Reduction JSFrameSpecialization::ReduceOsrValue(Node* node) {
29 DCHECK_EQ(IrOpcode::kOsrValue, node->opcode()); 29 DCHECK_EQ(IrOpcode::kOsrValue, node->opcode());
30 Handle<Object> value; 30 Handle<Object> value;
31 int const index = OpParameter<int>(node); 31 int index = OsrValueIndexOf(node->op());
32 int const parameters_count = frame()->ComputeParametersCount() + 1; 32 int const parameters_count = frame()->ComputeParametersCount() + 1;
33 if (index == Linkage::kOsrContextSpillSlotIndex) { 33 if (index == Linkage::kOsrContextSpillSlotIndex) {
34 value = handle(frame()->context(), isolate()); 34 value = handle(frame()->context(), isolate());
35 } else if (index >= parameters_count) { 35 } else if (index >= parameters_count) {
36 value = handle(frame()->GetExpression(index - parameters_count), isolate()); 36 value = handle(frame()->GetExpression(index - parameters_count), isolate());
37 } else { 37 } else {
38 // The OsrValue index 0 is the receiver. 38 // The OsrValue index 0 is the receiver.
39 value = 39 value =
40 handle(index ? frame()->GetParameter(index - 1) : frame()->receiver(), 40 handle(index ? frame()->GetParameter(index - 1) : frame()->receiver(),
41 isolate()); 41 isolate());
(...skipping 24 matching lines...) Expand all
66 } 66 }
67 return Replace(jsgraph()->Constant(value)); 67 return Replace(jsgraph()->Constant(value));
68 } 68 }
69 69
70 70
71 Isolate* JSFrameSpecialization::isolate() const { return jsgraph()->isolate(); } 71 Isolate* JSFrameSpecialization::isolate() const { return jsgraph()->isolate(); }
72 72
73 } // namespace compiler 73 } // namespace compiler
74 } // namespace internal 74 } // namespace internal
75 } // namespace v8 75 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/node-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698