Chromium Code Reviews| Index: src/compiler/ast-graph-builder.cc |
| diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
| index 99510e3abc8aa69cea2ab7d8d459072640fcea96..493c6365ab95aa13fda1371116bc9671c5bb21e8 100644 |
| --- a/src/compiler/ast-graph-builder.cc |
| +++ b/src/compiler/ast-graph-builder.cc |
| @@ -1641,6 +1641,11 @@ void AstGraphBuilder::VisitClassLiteralContents(ClassLiteral* expr) { |
| NewNode(op, environment()->Pop()); // prototype |
| NewNode(op, environment()->Pop()); // literal |
| if (is_strong(language_mode())) { |
| + proto = |
| + NewNode(javascript()->CallRuntime(Runtime::kObjectFreeze, 1), proto); |
| + // Freezing the class prototype should never deopt. |
| + PrepareFrameState(proto, BailoutId::None()); |
| + |
| // TODO(conradw): It would be more efficient to define the properties with |
|
rossberg
2015/07/14 07:45:22
Nit: move this comment before the proto freeze (ap
conradw
2015/07/14 11:21:27
Done.
|
| // the right attributes the first time round. |
| literal = |