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

Side by Side Diff: src/full-codegen.cc

Issue 798243004: ES6 computed property names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Disable test on windows Created 5 years, 11 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/full-codegen.h ('k') | src/hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 NestedStatement* current = nesting_stack_; 1204 NestedStatement* current = nesting_stack_;
1205 int stack_depth = 0; 1205 int stack_depth = 0;
1206 int context_length = 0; 1206 int context_length = 0;
1207 while (current != NULL) { 1207 while (current != NULL) {
1208 current = current->Exit(&stack_depth, &context_length); 1208 current = current->Exit(&stack_depth, &context_length);
1209 } 1209 }
1210 __ Drop(stack_depth); 1210 __ Drop(stack_depth);
1211 } 1211 }
1212 1212
1213 1213
1214 void FullCodeGenerator::EmitPropertyKey(ObjectLiteralProperty* property) {
1215 VisitForStackValue(property->key());
1216 __ InvokeBuiltin(Builtins::TO_NAME, CALL_FUNCTION);
1217 __ Push(result_register());
1218 }
1219
1220
1214 void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { 1221 void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
1215 Comment cmnt(masm_, "[ ReturnStatement"); 1222 Comment cmnt(masm_, "[ ReturnStatement");
1216 SetStatementPosition(stmt); 1223 SetStatementPosition(stmt);
1217 Expression* expr = stmt->expression(); 1224 Expression* expr = stmt->expression();
1218 VisitForAccumulatorValue(expr); 1225 VisitForAccumulatorValue(expr);
1219 EmitUnwindBeforeReturn(); 1226 EmitUnwindBeforeReturn();
1220 EmitReturnSequence(); 1227 EmitReturnSequence();
1221 } 1228 }
1222 1229
1223 1230
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 } 1826 }
1820 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1827 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1821 codegen_->scope_ = saved_scope_; 1828 codegen_->scope_ = saved_scope_;
1822 } 1829 }
1823 1830
1824 1831
1825 #undef __ 1832 #undef __
1826 1833
1827 1834
1828 } } // namespace v8::internal 1835 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698