OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 break; | 1332 break; |
1333 case Slot::LOCAL: | 1333 case Slot::LOCAL: |
1334 AddAttribute("type", "LOCAL"); | 1334 AddAttribute("type", "LOCAL"); |
1335 break; | 1335 break; |
1336 case Slot::CONTEXT: | 1336 case Slot::CONTEXT: |
1337 AddAttribute("type", "CONTEXT"); | 1337 AddAttribute("type", "CONTEXT"); |
1338 break; | 1338 break; |
1339 case Slot::LOOKUP: | 1339 case Slot::LOOKUP: |
1340 AddAttribute("type", "LOOKUP"); | 1340 AddAttribute("type", "LOOKUP"); |
1341 break; | 1341 break; |
1342 case Slot::GLOBAL: | |
1343 AddAttribute("type", "GLOBAL"); | |
1344 break; | |
1345 } | 1342 } |
1346 AddAttribute("index", expr->index()); | 1343 AddAttribute("index", expr->index()); |
1347 } | 1344 } |
1348 } | 1345 } |
1349 | 1346 |
1350 | 1347 |
1351 void JsonAstBuilder::VisitVariableProxy(VariableProxy* expr) { | 1348 void JsonAstBuilder::VisitVariableProxy(VariableProxy* expr) { |
1352 if (expr->var()->rewrite() == NULL) { | 1349 if (expr->var()->rewrite() == NULL) { |
1353 TagScope tag(this, "VariableProxy"); | 1350 TagScope tag(this, "VariableProxy"); |
1354 { | 1351 { |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1505 AddAttribute("mode", Variable::Mode2String(decl->mode())); | 1502 AddAttribute("mode", Variable::Mode2String(decl->mode())); |
1506 } | 1503 } |
1507 Visit(decl->proxy()); | 1504 Visit(decl->proxy()); |
1508 if (decl->fun() != NULL) Visit(decl->fun()); | 1505 if (decl->fun() != NULL) Visit(decl->fun()); |
1509 } | 1506 } |
1510 | 1507 |
1511 | 1508 |
1512 #endif // DEBUG | 1509 #endif // DEBUG |
1513 | 1510 |
1514 } } // namespace v8::internal | 1511 } } // namespace v8::internal |
OLD | NEW |