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

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

Issue 9704054: Refactoring of code generation for declarations, in preparation for modules. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Florian's comments. Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/full-codegen.h ('k') | src/hydrogen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 } 608 }
609 // Invoke the platform-dependent code generator to do the actual 609 // Invoke the platform-dependent code generator to do the actual
610 // declaration the global functions and variables. 610 // declaration the global functions and variables.
611 DeclareGlobals(array); 611 DeclareGlobals(array);
612 } 612 }
613 613
614 global_count_ = save_global_count; 614 global_count_ = save_global_count;
615 } 615 }
616 616
617 617
618 void FullCodeGenerator::VisitVariableDeclaration(VariableDeclaration* decl) {
619 EmitDeclaration(decl->proxy(), decl->mode(), NULL);
620 }
621
622
623 void FullCodeGenerator::VisitFunctionDeclaration(FunctionDeclaration* decl) {
624 EmitDeclaration(decl->proxy(), decl->mode(), decl->fun());
625 }
626
627
628 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* decl) {
629 EmitDeclaration(decl->proxy(), decl->mode(), NULL);
630 }
631
632
633 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* decl) {
634 EmitDeclaration(decl->proxy(), decl->mode(), NULL);
635 }
636
637
638 void FullCodeGenerator::VisitExportDeclaration(ExportDeclaration* decl) {
639 // TODO(rossberg)
640 }
641
642
643 void FullCodeGenerator::VisitModuleLiteral(ModuleLiteral* module) { 618 void FullCodeGenerator::VisitModuleLiteral(ModuleLiteral* module) {
644 // TODO(rossberg) 619 // TODO(rossberg)
645 } 620 }
646 621
647 622
648 void FullCodeGenerator::VisitModuleVariable(ModuleVariable* module) { 623 void FullCodeGenerator::VisitModuleVariable(ModuleVariable* module) {
649 // TODO(rossberg) 624 // TODO(rossberg)
650 } 625 }
651 626
652 627
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 } 1396 }
1422 1397
1423 return false; 1398 return false;
1424 } 1399 }
1425 1400
1426 1401
1427 #undef __ 1402 #undef __
1428 1403
1429 1404
1430 } } // namespace v8::internal 1405 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698