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

Side by Side Diff: src/scopeinfo.cc

Issue 9844002: Implement rudimentary module linking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 8 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 | « src/runtime.cc ('k') | src/scopes.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 // 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 ASSERT(function_name_info != STACK || 135 ASSERT(function_name_info != STACK ||
136 (var_index == scope_info->StackLocalCount() && 136 (var_index == scope_info->StackLocalCount() &&
137 var_index == scope_info->StackSlotCount() - 1)); 137 var_index == scope_info->StackSlotCount() - 1));
138 ASSERT(function_name_info != CONTEXT || 138 ASSERT(function_name_info != CONTEXT ||
139 var_index == scope_info->ContextLength() - 1); 139 var_index == scope_info->ContextLength() - 1);
140 } 140 }
141 141
142 ASSERT(index == scope_info->length()); 142 ASSERT(index == scope_info->length());
143 ASSERT(scope->num_parameters() == scope_info->ParameterCount()); 143 ASSERT(scope->num_parameters() == scope_info->ParameterCount());
144 ASSERT(scope->num_stack_slots() == scope_info->StackSlotCount()); 144 ASSERT(scope->num_stack_slots() == scope_info->StackSlotCount());
145 ASSERT(scope->num_heap_slots() == scope_info->ContextLength()); 145 ASSERT(scope->num_heap_slots() == scope_info->ContextLength() ||
146 (scope->num_heap_slots() == kVariablePartIndex &&
147 scope_info->ContextLength() == 0));
146 return scope_info; 148 return scope_info;
147 } 149 }
148 150
149 151
150 ScopeInfo* ScopeInfo::Empty() { 152 ScopeInfo* ScopeInfo::Empty() {
151 return reinterpret_cast<ScopeInfo*>(HEAP->empty_fixed_array()); 153 return reinterpret_cast<ScopeInfo*>(HEAP->empty_fixed_array());
152 } 154 }
153 155
154 156
155 ScopeType ScopeInfo::Type() { 157 ScopeType ScopeInfo::Type() {
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 Context::MIN_CONTEXT_SLOTS, 501 Context::MIN_CONTEXT_SLOTS,
500 ContextLocalNameEntriesIndex(), 502 ContextLocalNameEntriesIndex(),
501 ContextLocalNameEntriesIndex() + ContextLocalCount(), 503 ContextLocalNameEntriesIndex() + ContextLocalCount(),
502 this); 504 this);
503 505
504 PrintF("}\n"); 506 PrintF("}\n");
505 } 507 }
506 #endif // DEBUG 508 #endif // DEBUG
507 509
508 } } // namespace v8::internal 510 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698