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

Side by Side Diff: src/ast/scopeinfo.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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/ast/ast.cc ('k') | src/bootstrapper.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 // 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/ast/context-slot-cache.h" 7 #include "src/ast/context-slot-cache.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/ast/variables.h" 9 #include "src/ast/variables.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 IsDebugEvaluateScopeField::encode(false); 308 IsDebugEvaluateScopeField::encode(false);
309 scope_info->SetFlags(flags); 309 scope_info->SetFlags(flags);
310 310
311 scope_info->SetParameterCount(0); 311 scope_info->SetParameterCount(0);
312 scope_info->SetStackLocalCount(0); 312 scope_info->SetStackLocalCount(0);
313 scope_info->SetContextLocalCount(0); 313 scope_info->SetContextLocalCount(0);
314 314
315 int index = kVariablePartIndex; 315 int index = kVariablePartIndex;
316 DCHECK_EQ(index, scope_info->ParameterNamesIndex()); 316 DCHECK_EQ(index, scope_info->ParameterNamesIndex());
317 DCHECK_EQ(index, scope_info->StackLocalFirstSlotIndex()); 317 DCHECK_EQ(index, scope_info->StackLocalFirstSlotIndex());
318 scope_info->set(index++, Smi::kZero); 318 scope_info->set(index++, Smi::FromInt(0));
319 DCHECK_EQ(index, scope_info->StackLocalNamesIndex()); 319 DCHECK_EQ(index, scope_info->StackLocalNamesIndex());
320 DCHECK_EQ(index, scope_info->ReceiverInfoIndex()); 320 DCHECK_EQ(index, scope_info->ReceiverInfoIndex());
321 DCHECK_EQ(index, scope_info->FunctionNameInfoIndex()); 321 DCHECK_EQ(index, scope_info->FunctionNameInfoIndex());
322 DCHECK(index == scope_info->OuterScopeInfoIndex()); 322 DCHECK(index == scope_info->OuterScopeInfoIndex());
323 if (has_outer_scope_info) { 323 if (has_outer_scope_info) {
324 scope_info->set(index++, *outer_scope.ToHandleChecked()); 324 scope_info->set(index++, *outer_scope.ToHandleChecked());
325 } 325 }
326 DCHECK_EQ(index, scope_info->length()); 326 DCHECK_EQ(index, scope_info->length());
327 DCHECK_EQ(0, scope_info->ParameterCount()); 327 DCHECK_EQ(0, scope_info->ParameterCount());
328 DCHECK_EQ(Context::MIN_CONTEXT_SLOTS, scope_info->ContextLength()); 328 DCHECK_EQ(Context::MIN_CONTEXT_SLOTS, scope_info->ContextLength());
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 result->set(kModuleRequestsIndex, *module_requests); 899 result->set(kModuleRequestsIndex, *module_requests);
900 result->set(kSpecialExportsIndex, *special_exports); 900 result->set(kSpecialExportsIndex, *special_exports);
901 result->set(kRegularExportsIndex, *regular_exports); 901 result->set(kRegularExportsIndex, *regular_exports);
902 result->set(kNamespaceImportsIndex, *namespace_imports); 902 result->set(kNamespaceImportsIndex, *namespace_imports);
903 result->set(kRegularImportsIndex, *regular_imports); 903 result->set(kRegularImportsIndex, *regular_imports);
904 return result; 904 return result;
905 } 905 }
906 906
907 } // namespace internal 907 } // namespace internal
908 } // namespace v8 908 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698