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

Side by Side Diff: src/scopes.cc

Issue 137403009: Adding a type vector to replace type cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed feedback. Created 6 years, 10 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/type-info.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 // 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 : FLAG_print_scopes) { 300 : FLAG_print_scopes) {
301 scope->Print(); 301 scope->Print();
302 } 302 }
303 303
304 if (FLAG_harmony_modules && FLAG_print_interfaces && top->is_global_scope()) { 304 if (FLAG_harmony_modules && FLAG_print_interfaces && top->is_global_scope()) {
305 PrintF("global : "); 305 PrintF("global : ");
306 top->interface()->Print(); 306 top->interface()->Print();
307 } 307 }
308 #endif 308 #endif
309 309
310 info->SetScope(scope); 310 info->PrepareForCompilation(scope);
311 return true; 311 return true;
312 } 312 }
313 313
314 314
315 void Scope::Initialize() { 315 void Scope::Initialize() {
316 ASSERT(!already_resolved()); 316 ASSERT(!already_resolved());
317 317
318 // Add this scope as a new inner scope of the outer scope. 318 // Add this scope as a new inner scope of the outer scope.
319 if (outer_scope_ != NULL) { 319 if (outer_scope_ != NULL) {
320 outer_scope_->inner_scopes_.Add(this, zone()); 320 outer_scope_->inner_scopes_.Add(this, zone());
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 } 1404 }
1405 1405
1406 1406
1407 int Scope::ContextLocalCount() const { 1407 int Scope::ContextLocalCount() const {
1408 if (num_heap_slots() == 0) return 0; 1408 if (num_heap_slots() == 0) return 0;
1409 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1409 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1410 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); 1410 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0);
1411 } 1411 }
1412 1412
1413 } } // namespace v8::internal 1413 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698