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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 JSReceiver::SetProperty( | 1371 JSReceiver::SetProperty( |
1372 instance, it.name(), value, ro_attr, kStrictMode); | 1372 instance, it.name(), value, ro_attr, kStrictMode); |
1373 } else { | 1373 } else { |
1374 Variable* var = LocalLookup(it.name()); | 1374 Variable* var = LocalLookup(it.name()); |
1375 ASSERT(var != NULL && var->IsContextSlot()); | 1375 ASSERT(var != NULL && var->IsContextSlot()); |
1376 PropertyAttributes attr = var->is_const_mode() ? ro_attr : rw_attr; | 1376 PropertyAttributes attr = var->is_const_mode() ? ro_attr : rw_attr; |
1377 Handle<AccessorInfo> info = | 1377 Handle<AccessorInfo> info = |
1378 Accessors::MakeModuleExport(it.name(), var->index(), attr); | 1378 Accessors::MakeModuleExport(it.name(), var->index(), attr); |
1379 Handle<Object> result = SetAccessor(instance, info); | 1379 Handle<Object> result = SetAccessor(instance, info); |
1380 ASSERT(!(result.is_null() || result->IsUndefined())); | 1380 ASSERT(!(result.is_null() || result->IsUndefined())); |
| 1381 USE(result); |
1381 } | 1382 } |
1382 } | 1383 } |
1383 USE(JSObject::PreventExtensions(instance)); | 1384 USE(JSObject::PreventExtensions(instance)); |
1384 } | 1385 } |
1385 | 1386 |
1386 // Link nested modules. | 1387 // Link nested modules. |
1387 for (int i = 0; i < inner_scopes_.length(); i++) { | 1388 for (int i = 0; i < inner_scopes_.length(); i++) { |
1388 Scope* inner_scope = inner_scopes_.at(i); | 1389 Scope* inner_scope = inner_scopes_.at(i); |
1389 if (inner_scope->is_module_scope()) { | 1390 if (inner_scope->is_module_scope()) { |
1390 inner_scope->LinkModules(info); | 1391 inner_scope->LinkModules(info); |
1391 } | 1392 } |
1392 } | 1393 } |
1393 } | 1394 } |
1394 | 1395 |
1395 | 1396 |
1396 } } // namespace v8::internal | 1397 } } // namespace v8::internal |
OLD | NEW |