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

Side by Side Diff: src/scopes.cc

Issue 62143002: Add three string constants from parser to the root-set. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/rewriter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 var->AllocateTo(Variable::PARAMETER, i); 1295 var->AllocateTo(Variable::PARAMETER, i);
1296 } 1296 }
1297 } 1297 }
1298 } 1298 }
1299 } 1299 }
1300 } 1300 }
1301 1301
1302 1302
1303 void Scope::AllocateNonParameterLocal(Variable* var) { 1303 void Scope::AllocateNonParameterLocal(Variable* var) {
1304 ASSERT(var->scope() == this); 1304 ASSERT(var->scope() == this);
1305 ASSERT(!var->IsVariable(isolate_->factory()->result_string()) || 1305 ASSERT(!var->IsVariable(isolate_->factory()->dot_result_string()) ||
1306 !var->IsStackLocal()); 1306 !var->IsStackLocal());
1307 if (var->IsUnallocated() && MustAllocate(var)) { 1307 if (var->IsUnallocated() && MustAllocate(var)) {
1308 if (MustAllocateInContext(var)) { 1308 if (MustAllocateInContext(var)) {
1309 AllocateHeapSlot(var); 1309 AllocateHeapSlot(var);
1310 } else { 1310 } else {
1311 AllocateStackSlot(var); 1311 AllocateStackSlot(var);
1312 } 1312 }
1313 } 1313 }
1314 } 1314 }
1315 1315
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 } 1407 }
1408 1408
1409 1409
1410 int Scope::ContextLocalCount() const { 1410 int Scope::ContextLocalCount() const {
1411 if (num_heap_slots() == 0) return 0; 1411 if (num_heap_slots() == 0) return 0;
1412 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1412 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1413 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); 1413 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0);
1414 } 1414 }
1415 1415
1416 } } // namespace v8::internal 1416 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698