| OLD | NEW |
| 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-type-feedback.h" | 5 #include "src/compiler/js-type-feedback.h" |
| 6 | 6 |
| 7 #include "src/property-details.h" | 7 #include "src/property-details.h" |
| 8 | 8 |
| 9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
| 10 #include "src/ast.h" | 10 #include "src/ast.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 return false; | 138 return false; |
| 139 } | 139 } |
| 140 | 140 |
| 141 | 141 |
| 142 Reduction JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) { | 142 Reduction JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) { |
| 143 DCHECK(node->opcode() == IrOpcode::kJSLoadNamed); | 143 DCHECK(node->opcode() == IrOpcode::kJSLoadNamed); |
| 144 if (mode() != kDeoptimizationEnabled) return NoChange(); | 144 if (mode() != kDeoptimizationEnabled) return NoChange(); |
| 145 Node* frame_state_before = GetFrameStateBefore(node); | 145 Node* frame_state_before = GetFrameStateBefore(node); |
| 146 if (frame_state_before == nullptr) return NoChange(); | 146 if (frame_state_before == nullptr) return NoChange(); |
| 147 | 147 |
| 148 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); | 148 NamedAccess const& p = NamedAccessOf(node->op()); |
| 149 SmallMapList maps; | 149 SmallMapList maps; |
| 150 | 150 |
| 151 FeedbackVectorSlot slot = js_type_feedback_->FindFeedbackVectorSlot(node); | 151 FeedbackVectorSlot slot = js_type_feedback_->FindFeedbackVectorSlot(node); |
| 152 if (slot.IsInvalid() || | 152 if (slot.IsInvalid() || |
| 153 oracle()->LoadInlineCacheState(slot) == UNINITIALIZED) { | 153 oracle()->LoadInlineCacheState(slot) == UNINITIALIZED) { |
| 154 // No type feedback ids or the load is uninitialized. | 154 // No type feedback ids or the load is uninitialized. |
| 155 return NoChange(); | 155 return NoChange(); |
| 156 } | 156 } |
| 157 oracle()->PropertyReceiverTypes(slot, p.name(), &maps); | 157 oracle()->PropertyReceiverTypes(slot, p.name(), &maps); |
| 158 | 158 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 Reduction JSTypeFeedbackSpecializer::ReduceJSLoadProperty(Node* node) { | 248 Reduction JSTypeFeedbackSpecializer::ReduceJSLoadProperty(Node* node) { |
| 249 return NoChange(); | 249 return NoChange(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 | 252 |
| 253 Reduction JSTypeFeedbackSpecializer::ReduceJSStoreNamed(Node* node) { | 253 Reduction JSTypeFeedbackSpecializer::ReduceJSStoreNamed(Node* node) { |
| 254 DCHECK(node->opcode() == IrOpcode::kJSStoreNamed); | 254 DCHECK(node->opcode() == IrOpcode::kJSStoreNamed); |
| 255 Node* frame_state_before = GetFrameStateBefore(node); | 255 Node* frame_state_before = GetFrameStateBefore(node); |
| 256 if (frame_state_before == nullptr) return NoChange(); | 256 if (frame_state_before == nullptr) return NoChange(); |
| 257 | 257 |
| 258 const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); | 258 NamedAccess const& p = NamedAccessOf(node->op()); |
| 259 SmallMapList maps; | 259 SmallMapList maps; |
| 260 TypeFeedbackId id = js_type_feedback_->FindTypeFeedbackId(node); | 260 TypeFeedbackId id = js_type_feedback_->FindTypeFeedbackId(node); |
| 261 if (id.IsNone() || oracle()->StoreIsUninitialized(id) == UNINITIALIZED) { | 261 if (id.IsNone() || oracle()->StoreIsUninitialized(id) == UNINITIALIZED) { |
| 262 // No type feedback ids or the store is uninitialized. | 262 // No type feedback ids or the store is uninitialized. |
| 263 // TODO(titzer): no feedback from vector ICs from stores. | 263 // TODO(titzer): no feedback from vector ICs from stores. |
| 264 return NoChange(); | 264 return NoChange(); |
| 265 } else { | 265 } else { |
| 266 oracle()->AssignmentReceiverTypes(id, p.name(), &maps); | 266 oracle()->AssignmentReceiverTypes(id, p.name(), &maps); |
| 267 } | 267 } |
| 268 | 268 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 BailoutId id = OpParameter<FrameStateInfo>(node).bailout_id(); | 345 BailoutId id = OpParameter<FrameStateInfo>(node).bailout_id(); |
| 346 if (id != BailoutId::None()) return frame_state; | 346 if (id != BailoutId::None()) return frame_state; |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 return nullptr; | 349 return nullptr; |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace compiler | 352 } // namespace compiler |
| 353 } // namespace internal | 353 } // namespace internal |
| 354 } // namespace v8 | 354 } // namespace v8 |
| OLD | NEW |