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

Side by Side Diff: src/scopes.cc

Issue 636403003: Assign bailout and type feedback IDs in a post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 2 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/rewriter.cc ('k') | test/cctest/compiler/function-tester.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/scopes.h" 7 #include "src/scopes.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 // Traverse the scope tree up to the first unresolved scope or the global 269 // Traverse the scope tree up to the first unresolved scope or the global
270 // scope and start scope resolution and variable allocation from that scope. 270 // scope and start scope resolution and variable allocation from that scope.
271 while (!top->is_global_scope() && 271 while (!top->is_global_scope() &&
272 !top->outer_scope()->already_resolved()) { 272 !top->outer_scope()->already_resolved()) {
273 top = top->outer_scope(); 273 top = top->outer_scope();
274 } 274 }
275 275
276 // Allocate the variables. 276 // Allocate the variables.
277 { 277 {
278 AstNodeFactory<AstNullVisitor> ast_node_factory( 278 AstNodeFactory<AstNullVisitor> ast_node_factory(info->ast_value_factory());
279 info->zone(), info->ast_value_factory(), info->ast_node_id_gen());
280 if (!top->AllocateVariables(info, &ast_node_factory)) return false; 279 if (!top->AllocateVariables(info, &ast_node_factory)) return false;
281 } 280 }
282 281
283 #ifdef DEBUG 282 #ifdef DEBUG
284 if (info->isolate()->bootstrapper()->IsActive() 283 if (info->isolate()->bootstrapper()->IsActive()
285 ? FLAG_print_builtin_scopes 284 ? FLAG_print_builtin_scopes
286 : FLAG_print_scopes) { 285 : FLAG_print_scopes) {
287 scope->Print(); 286 scope->Print();
288 } 287 }
289 288
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 } 1423 }
1425 1424
1426 1425
1427 int Scope::ContextLocalCount() const { 1426 int Scope::ContextLocalCount() const {
1428 if (num_heap_slots() == 0) return 0; 1427 if (num_heap_slots() == 0) return 0;
1429 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1428 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1430 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); 1429 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0);
1431 } 1430 }
1432 1431
1433 } } // namespace v8::internal 1432 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/rewriter.cc ('k') | test/cctest/compiler/function-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698