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

Side by Side Diff: src/scopes.cc

Issue 523051: Make the ResolvePossiblyDirectEval faster by avoiding the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/x64/codegen-x64.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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // DYNAMIC variables are introduces during variable allocation, 229 // DYNAMIC variables are introduces during variable allocation,
230 // INTERNAL variables are allocated explicitly, and TEMPORARY 230 // INTERNAL variables are allocated explicitly, and TEMPORARY
231 // variables are allocated via NewTemporary(). 231 // variables are allocated via NewTemporary().
232 ASSERT(mode == Variable::VAR || mode == Variable::CONST); 232 ASSERT(mode == Variable::VAR || mode == Variable::CONST);
233 return variables_.Declare(this, name, mode, true, Variable::NORMAL); 233 return variables_.Declare(this, name, mode, true, Variable::NORMAL);
234 } 234 }
235 235
236 236
237 Variable* Scope::DeclareGlobal(Handle<String> name) { 237 Variable* Scope::DeclareGlobal(Handle<String> name) {
238 ASSERT(is_global_scope()); 238 ASSERT(is_global_scope());
239 return variables_.Declare(this, name, Variable::DYNAMIC, true, 239 return variables_.Declare(this, name, Variable::DYNAMIC_GLOBAL, true,
240 Variable::NORMAL); 240 Variable::NORMAL);
241 } 241 }
242 242
243 243
244 void Scope::AddParameter(Variable* var) { 244 void Scope::AddParameter(Variable* var) {
245 ASSERT(is_function_scope()); 245 ASSERT(is_function_scope());
246 ASSERT(LocalLookup(var->name()) == var); 246 ASSERT(LocalLookup(var->name()) == var);
247 params_.Add(var); 247 params_.Add(var);
248 } 248 }
249 249
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && 954 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS &&
955 !must_have_local_context) { 955 !must_have_local_context) {
956 num_heap_slots_ = 0; 956 num_heap_slots_ = 0;
957 } 957 }
958 958
959 // Allocation done. 959 // Allocation done.
960 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); 960 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS);
961 } 961 }
962 962
963 } } // namespace v8::internal 963 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698