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

Side by Side Diff: src/compiler/js-type-feedback.cc

Issue 1133303006: [turbofan] Add FrameStates before all property accesses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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-generic-lowering.cc ('k') | src/compiler/operator-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-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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 case IrOpcode::kJSLoadNamed: 54 case IrOpcode::kJSLoadNamed:
55 return ReduceJSLoadNamed(node); 55 return ReduceJSLoadNamed(node);
56 case IrOpcode::kJSStoreNamed: 56 case IrOpcode::kJSStoreNamed:
57 return ReduceJSStoreNamed(node); 57 return ReduceJSStoreNamed(node);
58 case IrOpcode::kJSStoreProperty: { 58 case IrOpcode::kJSStoreProperty: {
59 HeapObjectMatcher<Name> match(node->InputAt(1)); 59 HeapObjectMatcher<Name> match(node->InputAt(1));
60 if (match.HasValue() && match.Value().handle()->IsName()) { 60 if (match.HasValue() && match.Value().handle()->IsName()) {
61 // StoreProperty(o, "constant", v) => StoreNamed["constant"](o, v). 61 // StoreProperty(o, "constant", v) => StoreNamed["constant"](o, v).
62 Unique<Name> name = match.Value(); 62 Unique<Name> name = match.Value();
63 LanguageMode language_mode = OpParameter<LanguageMode>(node); 63 LanguageMode language_mode = OpParameter<LanguageMode>(node);
64 // StoreProperty has 2 frame state inputs, but StoreNamed only 1.
65 DCHECK_EQ(2, OperatorProperties::GetFrameStateInputCount(node->op()));
66 node->RemoveInput(NodeProperties::FirstFrameStateIndex(node) + 1);
67 node->set_op( 64 node->set_op(
68 jsgraph()->javascript()->StoreNamed(language_mode, name, KEYED)); 65 jsgraph()->javascript()->StoreNamed(language_mode, name, KEYED));
69 node->RemoveInput(1); 66 node->RemoveInput(1);
70 return ReduceJSStoreNamed(node); 67 return ReduceJSStoreNamed(node);
71 } 68 }
72 return ReduceJSStoreProperty(node); 69 return ReduceJSStoreProperty(node);
73 } 70 }
74 default: 71 default:
75 break; 72 break;
76 } 73 }
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 BailoutId id = OpParameter<FrameStateCallInfo>(node).bailout_id(); 375 BailoutId id = OpParameter<FrameStateCallInfo>(node).bailout_id();
379 if (id != BailoutId::None()) return frame_state; 376 if (id != BailoutId::None()) return frame_state;
380 } 377 }
381 } 378 }
382 return nullptr; 379 return nullptr;
383 } 380 }
384 381
385 } // namespace compiler 382 } // namespace compiler
386 } // namespace internal 383 } // namespace internal
387 } // namespace v8 384 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/operator-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698