| OLD | NEW |
| 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 #ifndef V8_AST_MODULES_H_ | 5 #ifndef V8_AST_MODULES_H_ |
| 6 #define V8_AST_MODULES_H_ | 6 #define V8_AST_MODULES_H_ |
| 7 | 7 |
| 8 #include "src/parsing/scanner.h" // Only for Scanner::Location. | 8 #include "src/parsing/scanner.h" // Only for Scanner::Location. |
| 9 #include "src/zone/zone-containers.h" | 9 #include "src/zone/zone-containers.h" |
| 10 | 10 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // (The import entry is never deleted.) | 207 // (The import entry is never deleted.) |
| 208 void MakeIndirectExportsExplicit(Zone* zone); | 208 void MakeIndirectExportsExplicit(Zone* zone); |
| 209 | 209 |
| 210 // Assign a cell_index of -1,-2,... to regular imports. | 210 // Assign a cell_index of -1,-2,... to regular imports. |
| 211 // Assign a cell_index of +1,+2,... to regular (local) exports. | 211 // Assign a cell_index of +1,+2,... to regular (local) exports. |
| 212 // Assign a cell_index of 0 to anything else. | 212 // Assign a cell_index of 0 to anything else. |
| 213 void AssignCellIndices(); | 213 void AssignCellIndices(); |
| 214 | 214 |
| 215 int AddModuleRequest(const AstRawString* specifier) { | 215 int AddModuleRequest(const AstRawString* specifier) { |
| 216 DCHECK_NOT_NULL(specifier); | 216 DCHECK_NOT_NULL(specifier); |
| 217 int module_requests_count = static_cast<int>(module_requests_.size()); |
| 217 auto it = module_requests_ | 218 auto it = module_requests_ |
| 218 .insert(std::make_pair(specifier, module_requests_.size())) | 219 .insert(std::make_pair(specifier, module_requests_count)) |
| 219 .first; | 220 .first; |
| 220 return it->second; | 221 return it->second; |
| 221 } | 222 } |
| 222 }; | 223 }; |
| 223 | 224 |
| 224 } // namespace internal | 225 } // namespace internal |
| 225 } // namespace v8 | 226 } // namespace v8 |
| 226 | 227 |
| 227 #endif // V8_AST_MODULES_H_ | 228 #endif // V8_AST_MODULES_H_ |
| OLD | NEW |