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

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 8423005: Remove some unnecessary binding initialization checks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 724
725 725
726 void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy, 726 void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy,
727 VariableMode mode, 727 VariableMode mode,
728 FunctionLiteral* function, 728 FunctionLiteral* function,
729 int* global_count) { 729 int* global_count) {
730 // If it was not possible to allocate the variable at compile time, we 730 // If it was not possible to allocate the variable at compile time, we
731 // need to "declare" it at runtime to make sure it actually exists in the 731 // need to "declare" it at runtime to make sure it actually exists in the
732 // local context. 732 // local context.
733 Variable* variable = proxy->var(); 733 Variable* variable = proxy->var();
734 bool binding_needs_init = 734 bool binding_needs_init = (function == NULL) &&
735 mode == CONST || mode == CONST_HARMONY || mode == LET; 735 (mode == CONST || mode == CONST_HARMONY || mode == LET);
736 switch (variable->location()) { 736 switch (variable->location()) {
737 case Variable::UNALLOCATED: 737 case Variable::UNALLOCATED:
738 ++(*global_count); 738 ++(*global_count);
739 break; 739 break;
740 740
741 case Variable::PARAMETER: 741 case Variable::PARAMETER:
742 case Variable::LOCAL: 742 case Variable::LOCAL:
743 if (function != NULL) { 743 if (function != NULL) {
744 Comment cmnt(masm_, "[ Declaration"); 744 Comment cmnt(masm_, "[ Declaration");
745 VisitForAccumulatorValue(function); 745 VisitForAccumulatorValue(function);
(...skipping 3602 matching lines...) Expand 10 before | Expand all | Expand 10 after
4348 *context_length = 0; 4348 *context_length = 0;
4349 return previous_; 4349 return previous_;
4350 } 4350 }
4351 4351
4352 4352
4353 #undef __ 4353 #undef __
4354 4354
4355 } } // namespace v8::internal 4355 } } // namespace v8::internal
4356 4356
4357 #endif // V8_TARGET_ARCH_MIPS 4357 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/objects.h » ('j') | src/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698