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

Side by Side Diff: src/scopeinfo.cc

Issue 6574032: [Isolates] Cleanup some Isolate usages. (Closed)
Patch Set: Created 9 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
« no previous file with comments | « src/jsregexp.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 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 while (p != end) { 442 while (p != end) {
443 if (*p == name) return static_cast<int>(p - p0); 443 if (*p == name) return static_cast<int>(p - p0);
444 p++; 444 p++;
445 } 445 }
446 } 446 }
447 return -1; 447 return -1;
448 } 448 }
449 449
450 int SerializedScopeInfo::ContextSlotIndex(String* name, Variable::Mode* mode) { 450 int SerializedScopeInfo::ContextSlotIndex(String* name, Variable::Mode* mode) {
451 ASSERT(name->IsSymbol()); 451 ASSERT(name->IsSymbol());
452 Isolate* isolate = Isolate::Current(); 452 Isolate* isolate = GetIsolate();
453 int result = isolate->context_slot_cache()->Lookup(this, name, mode); 453 int result = isolate->context_slot_cache()->Lookup(this, name, mode);
454 if (result != ContextSlotCache::kNotFound) return result; 454 if (result != ContextSlotCache::kNotFound) return result;
455 if (length() > 0) { 455 if (length() > 0) {
456 // Slots start after length entry. 456 // Slots start after length entry.
457 Object** p0 = ContextEntriesAddr(); 457 Object** p0 = ContextEntriesAddr();
458 int number_of_context_slots; 458 int number_of_context_slots;
459 p0 = ReadInt(p0, &number_of_context_slots); 459 p0 = ReadInt(p0, &number_of_context_slots);
460 Object** p = p0; 460 Object** p = p0;
461 Object** end = p0 + number_of_context_slots * 2; 461 Object** end = p0 + number_of_context_slots * 2;
462 while (p != end) { 462 while (p != end) {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 623 }
624 #endif // DEBUG 624 #endif // DEBUG
625 625
626 626
627 // Make sure the classes get instantiated by the template system. 627 // Make sure the classes get instantiated by the template system.
628 template class ScopeInfo<FreeStoreAllocationPolicy>; 628 template class ScopeInfo<FreeStoreAllocationPolicy>;
629 template class ScopeInfo<PreallocatedStorage>; 629 template class ScopeInfo<PreallocatedStorage>;
630 template class ScopeInfo<ZoneListAllocationPolicy>; 630 template class ScopeInfo<ZoneListAllocationPolicy>;
631 631
632 } } // namespace v8::internal 632 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698