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

Side by Side Diff: arguments/src/scopes.cc

Issue 6665067: [Arguments] Remove synthetic properties and all code dealing with them. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental
Patch Set: Created 9 years, 9 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 | « arguments/src/scopes.h ('k') | arguments/src/variables.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 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 var->set_rewrite(new Slot(var, Slot::PARAMETER, i)); 900 var->set_rewrite(new Slot(var, Slot::PARAMETER, i));
901 } 901 }
902 } 902 }
903 } 903 }
904 } 904 }
905 } 905 }
906 906
907 907
908 void Scope::AllocateNonParameterLocal(Variable* var) { 908 void Scope::AllocateNonParameterLocal(Variable* var) {
909 ASSERT(var->scope() == this); 909 ASSERT(var->scope() == this);
910 ASSERT(var->rewrite() == NULL || 910 ASSERT(var->rewrite() == NULL ||
Kevin Millikin (Chromium) 2011/03/17 14:44:08 I honestly don't understand why this assert is her
911 (!var->IsVariable(Factory::result_symbol())) || 911 !var->IsVariable(Factory::result_symbol()) ||
912 (var->AsSlot() == NULL || var->AsSlot()->type() != Slot::LOCAL)); 912 var->AsSlot() == NULL ||
913 var->AsSlot()->type() != Slot::LOCAL);
913 if (var->rewrite() == NULL && MustAllocate(var)) { 914 if (var->rewrite() == NULL && MustAllocate(var)) {
914 if (MustAllocateInContext(var)) { 915 if (MustAllocateInContext(var)) {
915 AllocateHeapSlot(var); 916 AllocateHeapSlot(var);
916 } else { 917 } else {
917 AllocateStackSlot(var); 918 AllocateStackSlot(var);
918 } 919 }
919 } 920 }
920 } 921 }
921 922
922 923
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && 978 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS &&
978 !must_have_local_context) { 979 !must_have_local_context) {
979 num_heap_slots_ = 0; 980 num_heap_slots_ = 0;
980 } 981 }
981 982
982 // Allocation done. 983 // Allocation done.
983 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); 984 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS);
984 } 985 }
985 986
986 } } // namespace v8::internal 987 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « arguments/src/scopes.h ('k') | arguments/src/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698