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

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

Issue 1772423002: Don't do any special normalization if a boilerplate contains function literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mark osr-one/osr-two as skip on ignition/arm Created 4 years, 9 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/ast.h ('k') | src/compiler/linkage.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 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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 Node* attr = jsgraph()->Constant(NONE); 1893 Node* attr = jsgraph()->Constant(NONE);
1894 const Operator* op = javascript()->CallRuntime( 1894 const Operator* op = javascript()->CallRuntime(
1895 Runtime::kDefineSetterPropertyUnchecked, 4); 1895 Runtime::kDefineSetterPropertyUnchecked, 4);
1896 Node* call = NewNode(op, receiver, key, value, attr); 1896 Node* call = NewNode(op, receiver, key, value, attr);
1897 PrepareFrameState(call, BailoutId::None()); 1897 PrepareFrameState(call, BailoutId::None());
1898 break; 1898 break;
1899 } 1899 }
1900 } 1900 }
1901 } 1901 }
1902 1902
1903 // Transform literals that contain functions to fast properties.
1904 literal = environment()->Top(); // Reload from operand stack.
1905 if (expr->has_function()) {
1906 const Operator* op = javascript()->CallRuntime(Runtime::kToFastProperties);
1907 NewNode(op, literal);
1908 }
1909
1910 ast_context()->ProduceValue(environment()->Pop()); 1903 ast_context()->ProduceValue(environment()->Pop());
1911 } 1904 }
1912 1905
1913 1906
1914 void AstGraphBuilder::VisitObjectLiteralAccessor( 1907 void AstGraphBuilder::VisitObjectLiteralAccessor(
1915 Node* home_object, ObjectLiteralProperty* property) { 1908 Node* home_object, ObjectLiteralProperty* property) {
1916 if (property == nullptr) { 1909 if (property == nullptr) {
1917 VisitForValueOrNull(nullptr); 1910 VisitForValueOrNull(nullptr);
1918 } else { 1911 } else {
1919 VisitForValue(property->value()); 1912 VisitForValue(property->value());
(...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after
4339 // Phi does not exist yet, introduce one. 4332 // Phi does not exist yet, introduce one.
4340 value = NewPhi(inputs, value, control); 4333 value = NewPhi(inputs, value, control);
4341 value->ReplaceInput(inputs - 1, other); 4334 value->ReplaceInput(inputs - 1, other);
4342 } 4335 }
4343 return value; 4336 return value;
4344 } 4337 }
4345 4338
4346 } // namespace compiler 4339 } // namespace compiler
4347 } // namespace internal 4340 } // namespace internal
4348 } // namespace v8 4341 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698