Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: src/parser.cc

Issue 7400023: fix -Wunused-but-set-variable for gcc-4.6 on x64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: without valgrind changes Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/platform-linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 fni_ = new(zone()) FuncNameInferrer(isolate()); 711 fni_ = new(zone()) FuncNameInferrer(isolate());
712 fni_->PushEnclosingName(name); 712 fni_->PushEnclosingName(name);
713 713
714 mode_ = PARSE_EAGERLY; 714 mode_ = PARSE_EAGERLY;
715 715
716 // Place holder for the result. 716 // Place holder for the result.
717 FunctionLiteral* result = NULL; 717 FunctionLiteral* result = NULL;
718 718
719 { 719 {
720 // Parse the function literal. 720 // Parse the function literal.
721 Handle<String> no_name = isolate()->factory()->empty_symbol();
722 Scope* scope = NewScope(top_scope_, Scope::GLOBAL_SCOPE, inside_with()); 721 Scope* scope = NewScope(top_scope_, Scope::GLOBAL_SCOPE, inside_with());
723 if (!info->closure().is_null()) { 722 if (!info->closure().is_null()) {
724 scope = Scope::DeserializeScopeChain(info, scope); 723 scope = Scope::DeserializeScopeChain(info, scope);
725 } 724 }
726 LexicalScope lexical_scope(this, scope, isolate()); 725 LexicalScope lexical_scope(this, scope, isolate());
727 726
728 if (shared_info->strict_mode()) { 727 if (shared_info->strict_mode()) {
729 top_scope_->EnableStrictMode(); 728 top_scope_->EnableStrictMode();
730 } 729 }
731 730
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
3418 // )*[','] '}' 3417 // )*[','] '}'
3419 3418
3420 ZoneList<ObjectLiteral::Property*>* properties = 3419 ZoneList<ObjectLiteral::Property*>* properties =
3421 new(zone()) ZoneList<ObjectLiteral::Property*>(4); 3420 new(zone()) ZoneList<ObjectLiteral::Property*>(4);
3422 int number_of_boilerplate_properties = 0; 3421 int number_of_boilerplate_properties = 0;
3423 bool has_function = false; 3422 bool has_function = false;
3424 3423
3425 ObjectLiteralPropertyChecker checker(this, top_scope_->is_strict_mode()); 3424 ObjectLiteralPropertyChecker checker(this, top_scope_->is_strict_mode());
3426 3425
3427 Expect(Token::LBRACE, CHECK_OK); 3426 Expect(Token::LBRACE, CHECK_OK);
3428 Scanner::Location loc = scanner().location();
3429 3427
3430 while (peek() != Token::RBRACE) { 3428 while (peek() != Token::RBRACE) {
3431 if (fni_ != NULL) fni_->Enter(); 3429 if (fni_ != NULL) fni_->Enter();
3432 3430
3433 Literal* key = NULL; 3431 Literal* key = NULL;
3434 Token::Value next = peek(); 3432 Token::Value next = peek();
3435 3433
3436 // Location of the property name token 3434 // Location of the property name token
3437 Scanner::Location loc = scanner().peek_location(); 3435 Scanner::Location loc = scanner().peek_location();
3438 3436
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
5085 info->is_global(), 5083 info->is_global(),
5086 info->StrictMode()); 5084 info->StrictMode());
5087 } 5085 }
5088 } 5086 }
5089 5087
5090 info->SetFunction(result); 5088 info->SetFunction(result);
5091 return (result != NULL); 5089 return (result != NULL);
5092 } 5090 }
5093 5091
5094 } } // namespace v8::internal 5092 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698