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

Side by Side Diff: src/serialize.cc

Issue 3792003: Optimizing HandleScope. Also fixed HandleScope destruction when API getter th... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/runtime.cc ('k') | src/x64/code-stubs-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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 Add(ExternalReference::fill_heap_number_with_random_function().address(), 330 Add(ExternalReference::fill_heap_number_with_random_function().address(),
331 RUNTIME_ENTRY, 331 RUNTIME_ENTRY,
332 2, 332 2,
333 "V8::FillHeapNumberWithRandom"); 333 "V8::FillHeapNumberWithRandom");
334 334
335 Add(ExternalReference::random_uint32_function().address(), 335 Add(ExternalReference::random_uint32_function().address(),
336 RUNTIME_ENTRY, 336 RUNTIME_ENTRY,
337 3, 337 3,
338 "V8::Random"); 338 "V8::Random");
339 339
340 Add(ExternalReference::delete_handle_scope_extensions().address(),
341 RUNTIME_ENTRY,
342 3,
343 "HandleScope::DeleteExtensions");
344
340 // Miscellaneous 345 // Miscellaneous
341 Add(ExternalReference::the_hole_value_location().address(), 346 Add(ExternalReference::the_hole_value_location().address(),
342 UNCLASSIFIED, 347 UNCLASSIFIED,
343 2, 348 2,
344 "Factory::the_hole_value().location()"); 349 "Factory::the_hole_value().location()");
345 Add(ExternalReference::roots_address().address(), 350 Add(ExternalReference::roots_address().address(),
346 UNCLASSIFIED, 351 UNCLASSIFIED,
347 3, 352 3,
348 "Heap::roots_address()"); 353 "Heap::roots_address()");
349 Add(ExternalReference::address_of_stack_limit().address(), 354 Add(ExternalReference::address_of_stack_limit().address(),
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 27, 455 27,
451 "KeyedLookupCache::keys()"); 456 "KeyedLookupCache::keys()");
452 Add(ExternalReference::keyed_lookup_cache_field_offsets().address(), 457 Add(ExternalReference::keyed_lookup_cache_field_offsets().address(),
453 UNCLASSIFIED, 458 UNCLASSIFIED,
454 28, 459 28,
455 "KeyedLookupCache::field_offsets()"); 460 "KeyedLookupCache::field_offsets()");
456 Add(ExternalReference::transcendental_cache_array_address().address(), 461 Add(ExternalReference::transcendental_cache_array_address().address(),
457 UNCLASSIFIED, 462 UNCLASSIFIED,
458 29, 463 29,
459 "TranscendentalCache::caches()"); 464 "TranscendentalCache::caches()");
465 Add(ExternalReference::handle_scope_next_address().address(),
466 UNCLASSIFIED,
467 30,
468 "HandleScope::next");
469 Add(ExternalReference::handle_scope_limit_address().address(),
470 UNCLASSIFIED,
471 31,
472 "HandleScope::limit");
473 Add(ExternalReference::handle_scope_level_address().address(),
474 UNCLASSIFIED,
475 32,
476 "HandleScope::level");
460 } 477 }
461 478
462 479
463 ExternalReferenceEncoder::ExternalReferenceEncoder() 480 ExternalReferenceEncoder::ExternalReferenceEncoder()
464 : encodings_(Match) { 481 : encodings_(Match) {
465 ExternalReferenceTable* external_references = 482 ExternalReferenceTable* external_references =
466 ExternalReferenceTable::instance(); 483 ExternalReferenceTable::instance();
467 for (int i = 0; i < external_references->size(); ++i) { 484 for (int i = 0; i < external_references->size(); ++i) {
468 Put(external_references->address(i), i); 485 Put(external_references->address(i), i);
469 } 486 }
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); 1485 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
1469 } 1486 }
1470 } 1487 }
1471 int allocation_address = fullness_[space]; 1488 int allocation_address = fullness_[space];
1472 fullness_[space] = allocation_address + size; 1489 fullness_[space] = allocation_address + size;
1473 return allocation_address; 1490 return allocation_address;
1474 } 1491 }
1475 1492
1476 1493
1477 } } // namespace v8::internal 1494 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698