| OLD | NEW |
| 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/compiler/js-typed-lowering.h" | 5 #include "src/compiler/js-typed-lowering.h" |
| 6 | 6 |
| 7 #include "src/ast/modules.h" | 7 #include "src/ast/modules.h" |
| 8 #include "src/builtins/builtins-utils.h" | 8 #include "src/builtins/builtins-utils.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compilation-dependencies.h" | 10 #include "src/compilation-dependencies.h" |
| (...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2193 ReplaceWithValue(node, node, effect, control); | 2193 ReplaceWithValue(node, node, effect, control); |
| 2194 node->ReplaceInput(0, vtrue0); | 2194 node->ReplaceInput(0, vtrue0); |
| 2195 node->ReplaceInput(1, vfalse0); | 2195 node->ReplaceInput(1, vfalse0); |
| 2196 node->ReplaceInput(2, control); | 2196 node->ReplaceInput(2, control); |
| 2197 node->TrimInputCount(3); | 2197 node->TrimInputCount(3); |
| 2198 NodeProperties::ChangeOp(node, | 2198 NodeProperties::ChangeOp(node, |
| 2199 common()->Phi(MachineRepresentation::kTagged, 2)); | 2199 common()->Phi(MachineRepresentation::kTagged, 2)); |
| 2200 return Changed(node); | 2200 return Changed(node); |
| 2201 } | 2201 } |
| 2202 | 2202 |
| 2203 Reduction JSTypedLowering::ReduceJSLoadMessage(Node* node) { |
| 2204 DCHECK_EQ(IrOpcode::kJSLoadMessage, node->opcode()); |
| 2205 ExternalReference const ref = |
| 2206 ExternalReference::address_of_pending_message_obj(isolate()); |
| 2207 node->ReplaceInput(0, jsgraph()->ExternalConstant(ref)); |
| 2208 NodeProperties::ChangeOp( |
| 2209 node, simplified()->LoadField(AccessBuilder::ForExternalTaggedValue())); |
| 2210 return Changed(node); |
| 2211 } |
| 2212 |
| 2213 Reduction JSTypedLowering::ReduceJSStoreMessage(Node* node) { |
| 2214 DCHECK_EQ(IrOpcode::kJSStoreMessage, node->opcode()); |
| 2215 ExternalReference const ref = |
| 2216 ExternalReference::address_of_pending_message_obj(isolate()); |
| 2217 Node* value = NodeProperties::GetValueInput(node, 0); |
| 2218 node->ReplaceInput(0, jsgraph()->ExternalConstant(ref)); |
| 2219 node->ReplaceInput(1, value); |
| 2220 NodeProperties::ChangeOp( |
| 2221 node, simplified()->StoreField(AccessBuilder::ForExternalTaggedValue())); |
| 2222 return Changed(node); |
| 2223 } |
| 2224 |
| 2203 Reduction JSTypedLowering::ReduceJSGeneratorStore(Node* node) { | 2225 Reduction JSTypedLowering::ReduceJSGeneratorStore(Node* node) { |
| 2204 DCHECK_EQ(IrOpcode::kJSGeneratorStore, node->opcode()); | 2226 DCHECK_EQ(IrOpcode::kJSGeneratorStore, node->opcode()); |
| 2205 Node* generator = NodeProperties::GetValueInput(node, 0); | 2227 Node* generator = NodeProperties::GetValueInput(node, 0); |
| 2206 Node* continuation = NodeProperties::GetValueInput(node, 1); | 2228 Node* continuation = NodeProperties::GetValueInput(node, 1); |
| 2207 Node* offset = NodeProperties::GetValueInput(node, 2); | 2229 Node* offset = NodeProperties::GetValueInput(node, 2); |
| 2208 Node* context = NodeProperties::GetContextInput(node); | 2230 Node* context = NodeProperties::GetContextInput(node); |
| 2209 Node* effect = NodeProperties::GetEffectInput(node); | 2231 Node* effect = NodeProperties::GetEffectInput(node); |
| 2210 Node* control = NodeProperties::GetControlInput(node); | 2232 Node* control = NodeProperties::GetControlInput(node); |
| 2211 int register_count = OpParameter<int>(node); | 2233 int register_count = OpParameter<int>(node); |
| 2212 | 2234 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2343 case IrOpcode::kJSStoreModule: | 2365 case IrOpcode::kJSStoreModule: |
| 2344 return ReduceJSStoreModule(node); | 2366 return ReduceJSStoreModule(node); |
| 2345 case IrOpcode::kJSConvertReceiver: | 2367 case IrOpcode::kJSConvertReceiver: |
| 2346 return ReduceJSConvertReceiver(node); | 2368 return ReduceJSConvertReceiver(node); |
| 2347 case IrOpcode::kJSCallConstruct: | 2369 case IrOpcode::kJSCallConstruct: |
| 2348 return ReduceJSCallConstruct(node); | 2370 return ReduceJSCallConstruct(node); |
| 2349 case IrOpcode::kJSCallFunction: | 2371 case IrOpcode::kJSCallFunction: |
| 2350 return ReduceJSCallFunction(node); | 2372 return ReduceJSCallFunction(node); |
| 2351 case IrOpcode::kJSForInNext: | 2373 case IrOpcode::kJSForInNext: |
| 2352 return ReduceJSForInNext(node); | 2374 return ReduceJSForInNext(node); |
| 2375 case IrOpcode::kJSLoadMessage: |
| 2376 return ReduceJSLoadMessage(node); |
| 2377 case IrOpcode::kJSStoreMessage: |
| 2378 return ReduceJSStoreMessage(node); |
| 2353 case IrOpcode::kJSGeneratorStore: | 2379 case IrOpcode::kJSGeneratorStore: |
| 2354 return ReduceJSGeneratorStore(node); | 2380 return ReduceJSGeneratorStore(node); |
| 2355 case IrOpcode::kJSGeneratorRestoreContinuation: | 2381 case IrOpcode::kJSGeneratorRestoreContinuation: |
| 2356 return ReduceJSGeneratorRestoreContinuation(node); | 2382 return ReduceJSGeneratorRestoreContinuation(node); |
| 2357 case IrOpcode::kJSGeneratorRestoreRegister: | 2383 case IrOpcode::kJSGeneratorRestoreRegister: |
| 2358 return ReduceJSGeneratorRestoreRegister(node); | 2384 return ReduceJSGeneratorRestoreRegister(node); |
| 2359 default: | 2385 default: |
| 2360 break; | 2386 break; |
| 2361 } | 2387 } |
| 2362 return NoChange(); | 2388 return NoChange(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2386 } | 2412 } |
| 2387 | 2413 |
| 2388 | 2414 |
| 2389 CompilationDependencies* JSTypedLowering::dependencies() const { | 2415 CompilationDependencies* JSTypedLowering::dependencies() const { |
| 2390 return dependencies_; | 2416 return dependencies_; |
| 2391 } | 2417 } |
| 2392 | 2418 |
| 2393 } // namespace compiler | 2419 } // namespace compiler |
| 2394 } // namespace internal | 2420 } // namespace internal |
| 2395 } // namespace v8 | 2421 } // namespace v8 |
| OLD | NEW |