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

Side by Side Diff: test/unittests/compiler/js-type-feedback-unittest.cc

Issue 1224793002: Loads and stores to global vars are now made via property cell shortcuts installed into parent scri… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 5 years, 5 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
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.h" 5 #include "src/compiler.h"
6 6
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 const char* string, Node* effect, Node* control, 78 const char* string, Node* effect, Node* control,
79 JSTypeFeedbackSpecializer::DeoptimizationMode mode) { 79 JSTypeFeedbackSpecializer::DeoptimizationMode mode) {
80 VectorSlotPair feedback; 80 VectorSlotPair feedback;
81 Node* global = UndefinedConstant(); 81 Node* global = UndefinedConstant();
82 Node* vector = UndefinedConstant(); 82 Node* vector = UndefinedConstant();
83 Node* context = UndefinedConstant(); 83 Node* context = UndefinedConstant();
84 84
85 Unique<Name> name = Unique<Name>::CreateUninitialized( 85 Unique<Name> name = Unique<Name>::CreateUninitialized(
86 isolate()->factory()->InternalizeUtf8String(string)); 86 isolate()->factory()->InternalizeUtf8String(string));
87 const Operator* op = javascript()->LoadGlobal(name, feedback); 87 const Operator* op = javascript()->LoadGlobal(name, feedback);
88 Node* load = graph()->NewNode(op, global, vector, context); 88 Node* load = graph()->NewNode(op, context, global, vector, context);
89 if (mode == JSTypeFeedbackSpecializer::kDeoptimizationEnabled) { 89 if (mode == JSTypeFeedbackSpecializer::kDeoptimizationEnabled) {
90 for (int i = 0; i < OperatorProperties::GetFrameStateInputCount(op); 90 for (int i = 0; i < OperatorProperties::GetFrameStateInputCount(op);
91 i++) { 91 i++) {
92 load->AppendInput(zone(), EmptyFrameState()); 92 load->AppendInput(zone(), EmptyFrameState());
93 } 93 }
94 } 94 }
95 load->AppendInput(zone(), effect); 95 load->AppendInput(zone(), effect);
96 load->AppendInput(zone(), control); 96 load->AppendInput(zone(), control);
97 Node* if_success = graph()->NewNode(common()->IfSuccess(), load); 97 Node* if_success = graph()->NewNode(common()->IfSuccess(), load);
98 return graph()->NewNode(common()->Return(), load, load, if_success); 98 return graph()->NewNode(common()->Return(), load, load, if_success);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 IsReturn(load_field_match, load_field_match, graph()->start())); 335 IsReturn(load_field_match, load_field_match, graph()->start()));
336 EXPECT_THAT(graph()->end(), IsEnd(ret)); 336 EXPECT_THAT(graph()->end(), IsEnd(ret));
337 337
338 EXPECT_FALSE(dependencies()->IsEmpty()); 338 EXPECT_FALSE(dependencies()->IsEmpty());
339 dependencies()->Rollback(); 339 dependencies()->Rollback();
340 } 340 }
341 341
342 } // namespace compiler 342 } // namespace compiler
343 } // namespace internal 343 } // namespace internal
344 } // namespace v8 344 } // namespace v8
OLDNEW
« no previous file with comments | « src/x87/interface-descriptors-x87.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698