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

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

Issue 1270393002: [strong] Refactor out separate strong runtime call for class objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 4 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 | « no previous file | 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/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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 NewNode(op, receiver, key, value, attr); 1636 NewNode(op, receiver, key, value, attr);
1637 break; 1637 break;
1638 } 1638 }
1639 } 1639 }
1640 } 1640 }
1641 1641
1642 // Set both the prototype and constructor to have fast properties, and also 1642 // Set both the prototype and constructor to have fast properties, and also
1643 // freeze them in strong mode. 1643 // freeze them in strong mode.
1644 environment()->Pop(); // proto 1644 environment()->Pop(); // proto
1645 environment()->Pop(); // literal 1645 environment()->Pop(); // literal
1646 const Operator* op = javascript()->CallRuntime( 1646 const Operator* op =
1647 is_strong(language_mode()) ? Runtime::kFinalizeClassDefinitionStrong 1647 javascript()->CallRuntime(Runtime::kFinalizeClassDefinition, 2);
1648 : Runtime::kFinalizeClassDefinition,
1649 2);
1650 literal = NewNode(op, literal, proto); 1648 literal = NewNode(op, literal, proto);
1651 1649
1652 // Assign to class variable. 1650 // Assign to class variable.
1653 if (expr->scope() != NULL) { 1651 if (expr->scope() != NULL) {
1654 DCHECK_NOT_NULL(expr->class_variable_proxy()); 1652 DCHECK_NOT_NULL(expr->class_variable_proxy());
1655 Variable* var = expr->class_variable_proxy()->var(); 1653 Variable* var = expr->class_variable_proxy()->var();
1656 FrameStateBeforeAndAfter states(this, BailoutId::None()); 1654 FrameStateBeforeAndAfter states(this, BailoutId::None());
1657 VectorSlotPair feedback = 1655 VectorSlotPair feedback =
1658 CreateVectorSlotPair(FLAG_vector_stores && var->IsUnallocated() 1656 CreateVectorSlotPair(FLAG_vector_stores && var->IsUnallocated()
1659 ? expr->GetNthSlot(store_slot_index++) 1657 ? expr->GetNthSlot(store_slot_index++)
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after
4305 // Phi does not exist yet, introduce one. 4303 // Phi does not exist yet, introduce one.
4306 value = NewPhi(inputs, value, control); 4304 value = NewPhi(inputs, value, control);
4307 value->ReplaceInput(inputs - 1, other); 4305 value->ReplaceInput(inputs - 1, other);
4308 } 4306 }
4309 return value; 4307 return value;
4310 } 4308 }
4311 4309
4312 } // namespace compiler 4310 } // namespace compiler
4313 } // namespace internal 4311 } // namespace internal
4314 } // namespace v8 4312 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698