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

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

Issue 1179893002: Add script context with context-allocated "const this" (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Factor out Variable::HasThisName 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
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | no next file » | 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.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
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()->NewStringFromAsciiChecked(string)); 86 isolate()->factory()->InternalizeUtf8String(string));
87 const Operator* op = javascript()->LoadNamed(name, feedback); 87 const Operator* op = javascript()->LoadNamed(name, feedback);
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);
(...skipping 238 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/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698