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

Side by Side Diff: src/arm/full-codegen-arm.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
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | src/scopes.h » ('J')
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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 714
715 715
716 void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy, 716 void FullCodeGenerator::EmitDeclaration(VariableProxy* proxy,
717 VariableMode mode, 717 VariableMode mode,
718 FunctionLiteral* function, 718 FunctionLiteral* function,
719 int* global_count) { 719 int* global_count) {
720 // If it was not possible to allocate the variable at compile time, we 720 // If it was not possible to allocate the variable at compile time, we
721 // need to "declare" it at runtime to make sure it actually exists in the 721 // need to "declare" it at runtime to make sure it actually exists in the
722 // local context. 722 // local context.
723 Variable* variable = proxy->var(); 723 Variable* variable = proxy->var();
724 bool binding_needs_init = 724 bool binding_needs_init = (function == NULL) &&
725 mode == CONST || mode == CONST_HARMONY || mode == LET; 725 (mode == CONST || mode == CONST_HARMONY || mode == LET);
726 switch (variable->location()) { 726 switch (variable->location()) {
727 case Variable::UNALLOCATED: 727 case Variable::UNALLOCATED:
728 ++(*global_count); 728 ++(*global_count);
729 break; 729 break;
730 730
731 case Variable::PARAMETER: 731 case Variable::PARAMETER:
732 case Variable::LOCAL: 732 case Variable::LOCAL:
733 if (function != NULL) { 733 if (function != NULL) {
734 Comment cmnt(masm_, "[ Declaration"); 734 Comment cmnt(masm_, "[ Declaration");
735 VisitForAccumulatorValue(function); 735 VisitForAccumulatorValue(function);
(...skipping 3583 matching lines...) Expand 10 before | Expand all | Expand 10 after
4319 *context_length = 0; 4319 *context_length = 0;
4320 return previous_; 4320 return previous_;
4321 } 4321 }
4322 4322
4323 4323
4324 #undef __ 4324 #undef __
4325 4325
4326 } } // namespace v8::internal 4326 } } // namespace v8::internal
4327 4327
4328 #endif // V8_TARGET_ARCH_ARM 4328 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | src/scopes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698