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

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

Issue 2079613003: [generators] Implement %GeneratorGetSourcePosition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rename again, and move subtraction to runtime Created 4 years, 6 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/compiler/js-operator.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 22 matching lines...) Expand all
33 case Runtime::kInlineCreateIterResultObject: 33 case Runtime::kInlineCreateIterResultObject:
34 return ReduceCreateIterResultObject(node); 34 return ReduceCreateIterResultObject(node);
35 case Runtime::kInlineDeoptimizeNow: 35 case Runtime::kInlineDeoptimizeNow:
36 return ReduceDeoptimizeNow(node); 36 return ReduceDeoptimizeNow(node);
37 case Runtime::kInlineDoubleHi: 37 case Runtime::kInlineDoubleHi:
38 return ReduceDoubleHi(node); 38 return ReduceDoubleHi(node);
39 case Runtime::kInlineDoubleLo: 39 case Runtime::kInlineDoubleLo:
40 return ReduceDoubleLo(node); 40 return ReduceDoubleLo(node);
41 case Runtime::kInlineGeneratorClose: 41 case Runtime::kInlineGeneratorClose:
42 return ReduceGeneratorClose(node); 42 return ReduceGeneratorClose(node);
43 case Runtime::kInlineGeneratorGetInput: 43 case Runtime::kInlineGeneratorGetInputOrDebugPos:
44 return ReduceGeneratorGetInput(node); 44 return ReduceGeneratorGetInputOrDebugPos(node);
45 case Runtime::kInlineGeneratorGetResumeMode: 45 case Runtime::kInlineGeneratorGetResumeMode:
46 return ReduceGeneratorGetResumeMode(node); 46 return ReduceGeneratorGetResumeMode(node);
47 case Runtime::kInlineIsArray: 47 case Runtime::kInlineIsArray:
48 return ReduceIsInstanceType(node, JS_ARRAY_TYPE); 48 return ReduceIsInstanceType(node, JS_ARRAY_TYPE);
49 case Runtime::kInlineIsTypedArray: 49 case Runtime::kInlineIsTypedArray:
50 return ReduceIsInstanceType(node, JS_TYPED_ARRAY_TYPE); 50 return ReduceIsInstanceType(node, JS_TYPED_ARRAY_TYPE);
51 case Runtime::kInlineIsRegExp: 51 case Runtime::kInlineIsRegExp:
52 return ReduceIsInstanceType(node, JS_REGEXP_TYPE); 52 return ReduceIsInstanceType(node, JS_REGEXP_TYPE);
53 case Runtime::kInlineIsJSReceiver: 53 case Runtime::kInlineIsJSReceiver:
54 return ReduceIsJSReceiver(node); 54 return ReduceIsJSReceiver(node);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 Node* const closed = jsgraph()->Constant(JSGeneratorObject::kGeneratorClosed); 150 Node* const closed = jsgraph()->Constant(JSGeneratorObject::kGeneratorClosed);
151 Node* const undefined = jsgraph()->UndefinedConstant(); 151 Node* const undefined = jsgraph()->UndefinedConstant();
152 Operator const* const op = simplified()->StoreField( 152 Operator const* const op = simplified()->StoreField(
153 AccessBuilder::ForJSGeneratorObjectContinuation()); 153 AccessBuilder::ForJSGeneratorObjectContinuation());
154 154
155 ReplaceWithValue(node, undefined, node); 155 ReplaceWithValue(node, undefined, node);
156 NodeProperties::RemoveType(node); 156 NodeProperties::RemoveType(node);
157 return Change(node, op, generator, closed, effect, control); 157 return Change(node, op, generator, closed, effect, control);
158 } 158 }
159 159
160 Reduction JSIntrinsicLowering::ReduceGeneratorGetInput(Node* node) { 160 Reduction JSIntrinsicLowering::ReduceGeneratorGetInputOrDebugPos(Node* node) {
161 Node* const generator = NodeProperties::GetValueInput(node, 0); 161 Node* const generator = NodeProperties::GetValueInput(node, 0);
162 Node* const effect = NodeProperties::GetEffectInput(node); 162 Node* const effect = NodeProperties::GetEffectInput(node);
163 Node* const control = NodeProperties::GetControlInput(node); 163 Node* const control = NodeProperties::GetControlInput(node);
164 Operator const* const op = 164 Operator const* const op = simplified()->LoadField(
165 simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectInput()); 165 AccessBuilder::ForJSGeneratorObjectInputOrDebugPos());
166 166
167 return Change(node, op, generator, effect, control); 167 return Change(node, op, generator, effect, control);
168 } 168 }
169 169
170 Reduction JSIntrinsicLowering::ReduceGeneratorGetResumeMode(Node* node) { 170 Reduction JSIntrinsicLowering::ReduceGeneratorGetResumeMode(Node* node) {
171 Node* const generator = NodeProperties::GetValueInput(node, 0); 171 Node* const generator = NodeProperties::GetValueInput(node, 0);
172 Node* const effect = NodeProperties::GetEffectInput(node); 172 Node* const effect = NodeProperties::GetEffectInput(node);
173 Node* const control = NodeProperties::GetControlInput(node); 173 Node* const control = NodeProperties::GetControlInput(node);
174 Operator const* const op = 174 Operator const* const op =
175 simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectResumeMode()); 175 simplified()->LoadField(AccessBuilder::ForJSGeneratorObjectResumeMode());
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 } 501 }
502 502
503 503
504 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { 504 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const {
505 return jsgraph()->simplified(); 505 return jsgraph()->simplified();
506 } 506 }
507 507
508 } // namespace compiler 508 } // namespace compiler
509 } // namespace internal 509 } // namespace internal
510 } // namespace v8 510 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698