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

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

Issue 2639533002: [generators] Always call function with closure context when resuming. (Closed)
Patch Set: Ports. Created 3 years, 11 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/js-intrinsic-lowering.h ('k') | src/interpreter/bytecode-generator.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-intrinsic-lowering.h" 5 #include "src/compiler/js-intrinsic-lowering.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 24 matching lines...) Expand all
35 case Runtime::kInlineDebugIsActive: 35 case Runtime::kInlineDebugIsActive:
36 return ReduceDebugIsActive(node); 36 return ReduceDebugIsActive(node);
37 case Runtime::kInlineDeoptimizeNow: 37 case Runtime::kInlineDeoptimizeNow:
38 return ReduceDeoptimizeNow(node); 38 return ReduceDeoptimizeNow(node);
39 case Runtime::kInlineGeneratorClose: 39 case Runtime::kInlineGeneratorClose:
40 return ReduceGeneratorClose(node); 40 return ReduceGeneratorClose(node);
41 case Runtime::kInlineGeneratorGetInputOrDebugPos: 41 case Runtime::kInlineGeneratorGetInputOrDebugPos:
42 return ReduceGeneratorGetInputOrDebugPos(node); 42 return ReduceGeneratorGetInputOrDebugPos(node);
43 case Runtime::kInlineGeneratorGetResumeMode: 43 case Runtime::kInlineGeneratorGetResumeMode:
44 return ReduceGeneratorGetResumeMode(node); 44 return ReduceGeneratorGetResumeMode(node);
45 case Runtime::kInlineGeneratorGetContext:
46 return ReduceGeneratorGetContext(node);
45 case Runtime::kInlineIsArray: 47 case Runtime::kInlineIsArray:
46 return ReduceIsInstanceType(node, JS_ARRAY_TYPE); 48 return ReduceIsInstanceType(node, JS_ARRAY_TYPE);
47 case Runtime::kInlineIsTypedArray: 49 case Runtime::kInlineIsTypedArray:
48 return ReduceIsInstanceType(node, JS_TYPED_ARRAY_TYPE); 50 return ReduceIsInstanceType(node, JS_TYPED_ARRAY_TYPE);
49 case Runtime::kInlineIsJSReceiver: 51 case Runtime::kInlineIsJSReceiver:
50 return ReduceIsJSReceiver(node); 52 return ReduceIsJSReceiver(node);
51 case Runtime::kInlineIsSmi: 53 case Runtime::kInlineIsSmi:
52 return ReduceIsSmi(node); 54 return ReduceIsSmi(node);
53 case Runtime::kInlineFixedArrayGet: 55 case Runtime::kInlineFixedArrayGet:
54 return ReduceFixedArrayGet(node); 56 return ReduceFixedArrayGet(node);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Reduction JSIntrinsicLowering::ReduceGeneratorGetInputOrDebugPos(Node* node) { 135 Reduction JSIntrinsicLowering::ReduceGeneratorGetInputOrDebugPos(Node* node) {
134 Node* const generator = NodeProperties::GetValueInput(node, 0); 136 Node* const generator = NodeProperties::GetValueInput(node, 0);
135 Node* const effect = NodeProperties::GetEffectInput(node); 137 Node* const effect = NodeProperties::GetEffectInput(node);
136 Node* const control = NodeProperties::GetControlInput(node); 138 Node* const control = NodeProperties::GetControlInput(node);
137 Operator const* const op = simplified()->LoadField( 139 Operator const* const op = simplified()->LoadField(
138 AccessBuilder::ForJSGeneratorObjectInputOrDebugPos()); 140 AccessBuilder::ForJSGeneratorObjectInputOrDebugPos());
139 141
140 return Change(node, op, generator, effect, control); 142 return Change(node, op, generator, effect, control);
141 } 143 }
142 144
145 Reduction JSIntrinsicLowering::ReduceGeneratorGetContext(Node* node) {
146 Node* const generator = NodeProperties::GetValueInput(node, 0);
147 Node* const effect = NodeProperties::GetEffectInput(node);
148 Node* const control = NodeProperties::GetControlInput(node);
149 Operator const* const op =
150 simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectContext());
151
152 return Change(node, op, generator, effect, control);
153 }
154
143 Reduction JSIntrinsicLowering::ReduceGeneratorGetResumeMode(Node* node) { 155 Reduction JSIntrinsicLowering::ReduceGeneratorGetResumeMode(Node* node) {
144 Node* const generator = NodeProperties::GetValueInput(node, 0); 156 Node* const generator = NodeProperties::GetValueInput(node, 0);
145 Node* const effect = NodeProperties::GetEffectInput(node); 157 Node* const effect = NodeProperties::GetEffectInput(node);
146 Node* const control = NodeProperties::GetControlInput(node); 158 Node* const control = NodeProperties::GetControlInput(node);
147 Operator const* const op = 159 Operator const* const op =
148 simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectResumeMode()); 160 simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectResumeMode());
149 161
150 return Change(node, op, generator, effect, control); 162 return Change(node, op, generator, effect, control);
151 } 163 }
152 164
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 return jsgraph_->javascript(); 369 return jsgraph_->javascript();
358 } 370 }
359 371
360 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { 372 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const {
361 return jsgraph()->simplified(); 373 return jsgraph()->simplified();
362 } 374 }
363 375
364 } // namespace compiler 376 } // namespace compiler
365 } // namespace internal 377 } // namespace internal
366 } // namespace v8 378 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698