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

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

Issue 663683006: Implement ES6 Template Literals (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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/control-builders.h" 8 #include "src/compiler/control-builders.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 ast_context()->ProduceValue(value); 848 ast_context()->ProduceValue(value);
849 } 849 }
850 850
851 851
852 void AstGraphBuilder::VisitLiteral(Literal* expr) { 852 void AstGraphBuilder::VisitLiteral(Literal* expr) {
853 Node* value = jsgraph()->Constant(expr->value()); 853 Node* value = jsgraph()->Constant(expr->value());
854 ast_context()->ProduceValue(value); 854 ast_context()->ProduceValue(value);
855 } 855 }
856 856
857 857
858 void AstGraphBuilder::VisitTemplateLiteral(TemplateLiteral* expr) {
859 UNREACHABLE();
860 }
861
862
858 void AstGraphBuilder::VisitRegExpLiteral(RegExpLiteral* expr) { 863 void AstGraphBuilder::VisitRegExpLiteral(RegExpLiteral* expr) {
859 Node* closure = GetFunctionClosure(); 864 Node* closure = GetFunctionClosure();
860 865
861 // Create node to materialize a regular expression literal. 866 // Create node to materialize a regular expression literal.
862 Node* literals_array = 867 Node* literals_array =
863 BuildLoadObjectField(closure, JSFunction::kLiteralsOffset); 868 BuildLoadObjectField(closure, JSFunction::kLiteralsOffset);
864 Node* literal_index = jsgraph()->Constant(expr->literal_index()); 869 Node* literal_index = jsgraph()->Constant(expr->literal_index());
865 Node* pattern = jsgraph()->Constant(expr->pattern()); 870 Node* pattern = jsgraph()->Constant(expr->pattern());
866 Node* flags = jsgraph()->Constant(expr->flags()); 871 Node* flags = jsgraph()->Constant(expr->flags());
867 const Operator* op = 872 const Operator* op =
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 DCHECK(NodeProperties::GetFrameStateInput(node)->opcode() == 2133 DCHECK(NodeProperties::GetFrameStateInput(node)->opcode() ==
2129 IrOpcode::kDead); 2134 IrOpcode::kDead);
2130 NodeProperties::ReplaceFrameStateInput( 2135 NodeProperties::ReplaceFrameStateInput(
2131 node, environment()->Checkpoint(ast_id, combine)); 2136 node, environment()->Checkpoint(ast_id, combine));
2132 } 2137 }
2133 } 2138 }
2134 2139
2135 } 2140 }
2136 } 2141 }
2137 } // namespace v8::internal::compiler 2142 } // namespace v8::internal::compiler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698