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

Side by Side Diff: src/scopes.cc

Issue 1935: New static flags system (Closed)
Patch Set: Merge, again. Created 12 years, 3 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.cc ('k') | src/serialize.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 if (MustAllocate(var) && var->rewrite_ == NULL) { 819 if (MustAllocate(var) && var->rewrite_ == NULL) {
820 if (MustAllocateInContext(var)) { 820 if (MustAllocateInContext(var)) {
821 AllocateHeapSlot(var); 821 AllocateHeapSlot(var);
822 } else { 822 } else {
823 AllocateStackSlot(var); 823 AllocateStackSlot(var);
824 } 824 }
825 } 825 }
826 } 826 }
827 827
828 828
829 DECLARE_bool(usage_computation);
830
831 void Scope::AllocateNonParameterLocals() { 829 void Scope::AllocateNonParameterLocals() {
832 // Each variable occurs exactly once in the locals_ list; all 830 // Each variable occurs exactly once in the locals_ list; all
833 // variables that have no rewrite yet are non-parameter locals. 831 // variables that have no rewrite yet are non-parameter locals.
834 832
835 // Sort them according to use such that the locals with more uses 833 // Sort them according to use such that the locals with more uses
836 // get allocated first. 834 // get allocated first.
837 if (FLAG_usage_computation) { 835 if (FLAG_usage_computation) {
838 // This is currently not implemented. 836 // This is currently not implemented.
839 } 837 }
840 838
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && 886 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS &&
889 !must_have_local_context) { 887 !must_have_local_context) {
890 num_heap_slots_ = 0; 888 num_heap_slots_ = 0;
891 } 889 }
892 890
893 // Allocation done. 891 // Allocation done.
894 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); 892 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS);
895 } 893 }
896 894
897 } } // namespace v8::internal 895 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698