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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 2108193003: [modules] AST and parser rework. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@anonymous-declarations
Patch Set: Rebase. Created 4 years, 5 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/globals.h ('k') | src/parsing/parser.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/interpreter/bytecode-flags.h" 10 #include "src/interpreter/bytecode-flags.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 Register literal = register_allocator()->NextConsecutiveRegister(); 800 Register literal = register_allocator()->NextConsecutiveRegister();
801 builder()->LoadLiteral(variable->name()).StoreAccumulatorInRegister(name); 801 builder()->LoadLiteral(variable->name()).StoreAccumulatorInRegister(name);
802 802
803 VisitForAccumulatorValue(decl->fun()); 803 VisitForAccumulatorValue(decl->fun());
804 builder()->StoreAccumulatorInRegister(literal).CallRuntime( 804 builder()->StoreAccumulatorInRegister(literal).CallRuntime(
805 Runtime::kDeclareEvalFunction, name, 2); 805 Runtime::kDeclareEvalFunction, name, 2);
806 } 806 }
807 } 807 }
808 } 808 }
809 809
810 void BytecodeGenerator::VisitImportDeclaration(ImportDeclaration* decl) {
811 UNIMPLEMENTED();
812 }
813
814 void BytecodeGenerator::VisitDeclarations( 810 void BytecodeGenerator::VisitDeclarations(
815 ZoneList<Declaration*>* declarations) { 811 ZoneList<Declaration*>* declarations) {
816 RegisterAllocationScope register_scope(this); 812 RegisterAllocationScope register_scope(this);
817 DCHECK(globals()->empty()); 813 DCHECK(globals()->empty());
818 for (int i = 0; i < declarations->length(); i++) { 814 for (int i = 0; i < declarations->length(); i++) {
819 RegisterAllocationScope register_scope(this); 815 RegisterAllocationScope register_scope(this);
820 Visit(declarations->at(i)); 816 Visit(declarations->at(i));
821 } 817 }
822 if (globals()->empty()) return; 818 if (globals()->empty()) return;
823 int array_index = 0; 819 int array_index = 0;
(...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 return execution_context()->scope()->language_mode(); 3178 return execution_context()->scope()->language_mode();
3183 } 3179 }
3184 3180
3185 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3181 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3186 return TypeFeedbackVector::GetIndex(slot); 3182 return TypeFeedbackVector::GetIndex(slot);
3187 } 3183 }
3188 3184
3189 } // namespace interpreter 3185 } // namespace interpreter
3190 } // namespace internal 3186 } // namespace internal
3191 } // namespace v8 3187 } // namespace v8
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698