OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3750 name = isolate_->factory()->LookupAsciiSymbol(Token::String(next)); | 3750 name = isolate_->factory()->LookupAsciiSymbol(Token::String(next)); |
3751 } else { | 3751 } else { |
3752 name = GetSymbol(CHECK_OK); | 3752 name = GetSymbol(CHECK_OK); |
3753 } | 3753 } |
3754 FunctionLiteral* value = | 3754 FunctionLiteral* value = |
3755 ParseFunctionLiteral(name, | 3755 ParseFunctionLiteral(name, |
3756 false, // reserved words are allowed here | 3756 false, // reserved words are allowed here |
3757 RelocInfo::kNoPosition, | 3757 RelocInfo::kNoPosition, |
3758 FunctionLiteral::ANONYMOUS_EXPRESSION, | 3758 FunctionLiteral::ANONYMOUS_EXPRESSION, |
3759 CHECK_OK); | 3759 CHECK_OK); |
3760 // Allow any number of parameters for compatiabilty with JSC. | 3760 // Allow any number of parameters for compatibilty with JSC. |
3761 // Specification only allows zero parameters for get and one for set. | 3761 // Specification only allows zero parameters for get and one for set. |
3762 ObjectLiteral::Property* property = | 3762 ObjectLiteral::Property* property = |
3763 new(zone()) ObjectLiteral::Property(is_getter, value); | 3763 new(zone()) ObjectLiteral::Property(is_getter, value); |
3764 return property; | 3764 return property; |
3765 } else { | 3765 } else { |
3766 ReportUnexpectedToken(next); | 3766 ReportUnexpectedToken(next); |
3767 *ok = false; | 3767 *ok = false; |
3768 return NULL; | 3768 return NULL; |
3769 } | 3769 } |
3770 } | 3770 } |
(...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5689 ASSERT(info->isolate()->has_pending_exception()); | 5689 ASSERT(info->isolate()->has_pending_exception()); |
5690 } else { | 5690 } else { |
5691 result = parser.ParseProgram(info); | 5691 result = parser.ParseProgram(info); |
5692 } | 5692 } |
5693 } | 5693 } |
5694 info->SetFunction(result); | 5694 info->SetFunction(result); |
5695 return (result != NULL); | 5695 return (result != NULL); |
5696 } | 5696 } |
5697 | 5697 |
5698 } } // namespace v8::internal | 5698 } } // namespace v8::internal |
OLD | NEW |