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

Side by Side Diff: src/scopeinfo.cc

Issue 1250513004: [es6] Make sure temporaries are not allocated in block scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/scopes.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/scopeinfo.h" 10 #include "src/scopeinfo.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 } 557 }
558 558
559 context_slot_cache->Update(scope_info, name, *mode, *location, 559 context_slot_cache->Update(scope_info, name, *mode, *location,
560 *init_flag, *maybe_assigned_flag, result); 560 *init_flag, *maybe_assigned_flag, result);
561 DCHECK(result < scope_info->ContextLength()); 561 DCHECK(result < scope_info->ContextLength());
562 return result; 562 return result;
563 } 563 }
564 } 564 }
565 // Cache as not found. Mode, location, init flag and maybe assigned flag 565 // Cache as not found. Mode, location, init flag and maybe assigned flag
566 // don't matter. 566 // don't matter.
567 context_slot_cache->Update(scope_info, name, INTERNAL, 567 context_slot_cache->Update(scope_info, name, TEMPORARY,
568 VariableLocation::CONTEXT, kNeedsInitialization, 568 VariableLocation::CONTEXT, kNeedsInitialization,
569 kNotAssigned, -1); 569 kNotAssigned, -1);
570 } 570 }
571 return -1; 571 return -1;
572 } 572 }
573 573
574 574
575 int ScopeInfo::ParameterIndex(String* name) { 575 int ScopeInfo::ParameterIndex(String* name) {
576 DCHECK(name->IsInternalizedString()); 576 DCHECK(name->IsInternalizedString());
577 if (length() > 0) { 577 if (length() > 0) {
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 info->set_mode(i, var->mode()); 846 info->set_mode(i, var->mode());
847 DCHECK(var->index() >= 0); 847 DCHECK(var->index() >= 0);
848 info->set_index(i, var->index()); 848 info->set_index(i, var->index());
849 } 849 }
850 DCHECK(i == info->length()); 850 DCHECK(i == info->length());
851 return info; 851 return info;
852 } 852 }
853 853
854 } // namespace internal 854 } // namespace internal
855 } // namespace v8 855 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698