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

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

Issue 1168093002: [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 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
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Node* ReturnLoadNamedFromGlobal( 77 Node* ReturnLoadNamedFromGlobal(
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 ResolvedFeedbackSlot feedback; 80 ResolvedFeedbackSlot feedback;
81 Node* global = Parameter(Type::GlobalObject()); 81 Node* global = Parameter(Type::GlobalObject());
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()->LoadNamed(name, feedback); 87 const Operator* op = javascript()->LoadNamed(name, feedback, SLOPPY);
88 Node* load = graph()->NewNode(op, global, vector, context); 88 Node* load = graph()->NewNode(op, 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);
(...skipping 237 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 | « test/mjsunit/strong/load-property-mutate-backing-store.js ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698