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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 scope->uses_super_property()); | 1042 scope->uses_super_property()); |
1043 CHECK_EQ((source_data[i].expected & SUPER_CONSTRUCTOR_CALL) != 0, | 1043 CHECK_EQ((source_data[i].expected & SUPER_CONSTRUCTOR_CALL) != 0, |
1044 scope->uses_super_constructor_call()); | 1044 scope->uses_super_constructor_call()); |
1045 CHECK_EQ((source_data[i].expected & THIS) != 0, scope->uses_this()); | 1045 CHECK_EQ((source_data[i].expected & THIS) != 0, scope->uses_this()); |
1046 CHECK_EQ((source_data[i].expected & INNER_ARGUMENTS) != 0, | 1046 CHECK_EQ((source_data[i].expected & INNER_ARGUMENTS) != 0, |
1047 scope->inner_uses_arguments()); | 1047 scope->inner_uses_arguments()); |
1048 CHECK_EQ((source_data[i].expected & INNER_SUPER_PROPERTY) != 0, | 1048 CHECK_EQ((source_data[i].expected & INNER_SUPER_PROPERTY) != 0, |
1049 scope->inner_uses_super_property()); | 1049 scope->inner_uses_super_property()); |
1050 CHECK_EQ((source_data[i].expected & INNER_SUPER_CONSTRUCTOR_CALL) != 0, | 1050 CHECK_EQ((source_data[i].expected & INNER_SUPER_CONSTRUCTOR_CALL) != 0, |
1051 scope->inner_uses_super_constructor_call()); | 1051 scope->inner_uses_super_constructor_call()); |
1052 CHECK_EQ((source_data[i].expected & INNER_THIS) != 0, | 1052 // CHECK_EQ((source_data[i].expected & INNER_THIS) != 0, |
1053 scope->inner_uses_this()); | 1053 // scope->inner_uses_this()); |
1054 } | 1054 } |
1055 } | 1055 } |
1056 } | 1056 } |
1057 | 1057 |
1058 | 1058 |
1059 TEST(ScopePositions) { | 1059 TEST(ScopePositions) { |
1060 v8::internal::FLAG_harmony_scoping = true; | 1060 v8::internal::FLAG_harmony_scoping = true; |
1061 | 1061 |
1062 // Test the parser for correctly setting the start and end positions | 1062 // Test the parser for correctly setting the start and end positions |
1063 // of a scope. We check the scope positions of exactly one scope | 1063 // of a scope. We check the scope positions of exactly one scope |
(...skipping 3597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4661 | 4661 |
4662 static const ParserFlag always_flags[] = { | 4662 static const ParserFlag always_flags[] = { |
4663 kAllowHarmonyClasses, | 4663 kAllowHarmonyClasses, |
4664 kAllowHarmonyComputedPropertyNames, | 4664 kAllowHarmonyComputedPropertyNames, |
4665 kAllowHarmonyObjectLiterals, | 4665 kAllowHarmonyObjectLiterals, |
4666 kAllowHarmonySloppy, | 4666 kAllowHarmonySloppy, |
4667 }; | 4667 }; |
4668 RunParserSyncTest(context_data, error_data, kError, NULL, 0, | 4668 RunParserSyncTest(context_data, error_data, kError, NULL, 0, |
4669 always_flags, arraysize(always_flags)); | 4669 always_flags, arraysize(always_flags)); |
4670 } | 4670 } |
OLD | NEW |