OLD | NEW |
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-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 builder()->StoreAccumulatorInRegister(literal).CallRuntime( | 810 builder()->StoreAccumulatorInRegister(literal).CallRuntime( |
811 Runtime::kDeclareEvalFunction, name, 2); | 811 Runtime::kDeclareEvalFunction, name, 2); |
812 } | 812 } |
813 } | 813 } |
814 } | 814 } |
815 | 815 |
816 void BytecodeGenerator::VisitImportDeclaration(ImportDeclaration* decl) { | 816 void BytecodeGenerator::VisitImportDeclaration(ImportDeclaration* decl) { |
817 UNIMPLEMENTED(); | 817 UNIMPLEMENTED(); |
818 } | 818 } |
819 | 819 |
820 void BytecodeGenerator::VisitExportDeclaration(ExportDeclaration* decl) { | |
821 UNIMPLEMENTED(); | |
822 } | |
823 | |
824 void BytecodeGenerator::VisitDeclarations( | 820 void BytecodeGenerator::VisitDeclarations( |
825 ZoneList<Declaration*>* declarations) { | 821 ZoneList<Declaration*>* declarations) { |
826 RegisterAllocationScope register_scope(this); | 822 RegisterAllocationScope register_scope(this); |
827 DCHECK(globals()->empty()); | 823 DCHECK(globals()->empty()); |
828 for (int i = 0; i < declarations->length(); i++) { | 824 for (int i = 0; i < declarations->length(); i++) { |
829 RegisterAllocationScope register_scope(this); | 825 RegisterAllocationScope register_scope(this); |
830 Visit(declarations->at(i)); | 826 Visit(declarations->at(i)); |
831 } | 827 } |
832 if (globals()->empty()) return; | 828 if (globals()->empty()) return; |
833 int array_index = 0; | 829 int array_index = 0; |
(...skipping 2344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3178 return execution_context()->scope()->language_mode(); | 3174 return execution_context()->scope()->language_mode(); |
3179 } | 3175 } |
3180 | 3176 |
3181 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 3177 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
3182 return TypeFeedbackVector::GetIndex(slot); | 3178 return TypeFeedbackVector::GetIndex(slot); |
3183 } | 3179 } |
3184 | 3180 |
3185 } // namespace interpreter | 3181 } // namespace interpreter |
3186 } // namespace internal | 3182 } // namespace internal |
3187 } // namespace v8 | 3183 } // namespace v8 |
OLD | NEW |