| OLD | NEW |
| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 | 586 |
| 587 globals_ = saved_globals; | 587 globals_ = saved_globals; |
| 588 } | 588 } |
| 589 | 589 |
| 590 | 590 |
| 591 void FullCodeGenerator::VisitModuleLiteral(ModuleLiteral* module) { | 591 void FullCodeGenerator::VisitModuleLiteral(ModuleLiteral* module) { |
| 592 // Allocate a module context statically. | 592 // Allocate a module context statically. |
| 593 Block* block = module->body(); | 593 Block* block = module->body(); |
| 594 Scope* saved_scope = scope(); | 594 Scope* saved_scope = scope(); |
| 595 scope_ = block->scope(); | 595 scope_ = block->scope(); |
| 596 Handle<ScopeInfo> scope_info = scope_->GetScopeInfo(); | |
| 597 Interface* interface = module->interface(); | 596 Interface* interface = module->interface(); |
| 598 Handle<JSModule> instance = interface->Instance(); | 597 Handle<JSModule> instance = interface->Instance(); |
| 599 | 598 |
| 600 Comment cmnt(masm_, "[ ModuleLiteral"); | 599 Comment cmnt(masm_, "[ ModuleLiteral"); |
| 601 SetStatementPosition(block); | 600 SetStatementPosition(block); |
| 602 | 601 |
| 603 // Set up module context. | 602 // Set up module context. |
| 604 __ Push(instance); | 603 __ Push(instance); |
| 605 __ CallRuntime(Runtime::kPushModuleContext, 1); | 604 __ CallRuntime(Runtime::kPushModuleContext, 1); |
| 606 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); | 605 StoreToFrameField(StandardFrameConstants::kContextOffset, context_register()); |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1407 } | 1406 } |
| 1408 | 1407 |
| 1409 return false; | 1408 return false; |
| 1410 } | 1409 } |
| 1411 | 1410 |
| 1412 | 1411 |
| 1413 #undef __ | 1412 #undef __ |
| 1414 | 1413 |
| 1415 | 1414 |
| 1416 } } // namespace v8::internal | 1415 } } // namespace v8::internal |
| OLD | NEW |