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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 1135243004: [es6] Support super.property in eval and arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code review cleanup 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/ast-value-factory.h ('k') | src/full-codegen.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 2218
2219 void AstGraphBuilder::VisitThrow(Throw* expr) { 2219 void AstGraphBuilder::VisitThrow(Throw* expr) {
2220 VisitForValue(expr->exception()); 2220 VisitForValue(expr->exception());
2221 Node* exception = environment()->Pop(); 2221 Node* exception = environment()->Pop();
2222 Node* value = BuildThrowError(exception, expr->id()); 2222 Node* value = BuildThrowError(exception, expr->id());
2223 ast_context()->ProduceValue(value); 2223 ast_context()->ProduceValue(value);
2224 } 2224 }
2225 2225
2226 2226
2227 void AstGraphBuilder::VisitProperty(Property* expr) { 2227 void AstGraphBuilder::VisitProperty(Property* expr) {
2228 if (expr->obj()->IsSuperReference()) {
2229 // TODO(turbofan): Implement super here.
2230 SetStackOverflow();
2231 ast_context()->ProduceValue(jsgraph()->UndefinedConstant());
2232 return;
2233 }
2234
2228 Node* value; 2235 Node* value;
2229 VectorSlotPair pair = CreateVectorSlotPair(expr->PropertyFeedbackSlot()); 2236 VectorSlotPair pair = CreateVectorSlotPair(expr->PropertyFeedbackSlot());
2230 if (expr->key()->IsPropertyName()) { 2237 if (expr->key()->IsPropertyName()) {
2231 VisitForValue(expr->obj()); 2238 VisitForValue(expr->obj());
2232 FrameStateBeforeAndAfter states(this, expr->obj()->id()); 2239 FrameStateBeforeAndAfter states(this, expr->obj()->id());
2233 Node* object = environment()->Pop(); 2240 Node* object = environment()->Pop();
2234 Handle<Name> name = expr->key()->AsLiteral()->AsPropertyName(); 2241 Handle<Name> name = expr->key()->AsLiteral()->AsPropertyName();
2235 value = BuildNamedLoad(object, name, pair); 2242 value = BuildNamedLoad(object, name, pair);
2236 states.AddToNode(value, expr->id(), ast_context()->GetStateCombine()); 2243 states.AddToNode(value, expr->id(), ast_context()->GetStateCombine());
2237 } else { 2244 } else {
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
3786 // Phi does not exist yet, introduce one. 3793 // Phi does not exist yet, introduce one.
3787 value = NewPhi(inputs, value, control); 3794 value = NewPhi(inputs, value, control);
3788 value->ReplaceInput(inputs - 1, other); 3795 value->ReplaceInput(inputs - 1, other);
3789 } 3796 }
3790 return value; 3797 return value;
3791 } 3798 }
3792 3799
3793 } // namespace compiler 3800 } // namespace compiler
3794 } // namespace internal 3801 } // namespace internal
3795 } // namespace v8 3802 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast-value-factory.h ('k') | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698