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

Side by Side Diff: src/runtime.cc

Issue 11085070: Enable --verify-heap in release mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More comment response, thx! Created 8 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/objects-inl.h ('k') | src/spaces.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 13002 matching lines...) Expand 10 before | Expand all | Expand 10 after
13013 Handle<Object> argv[] = { key_handle }; 13013 Handle<Object> argv[] = { key_handle };
13014 bool pending_exception; 13014 bool pending_exception;
13015 value = Execution::Call(factory, 13015 value = Execution::Call(factory,
13016 receiver, 13016 receiver,
13017 ARRAY_SIZE(argv), 13017 ARRAY_SIZE(argv),
13018 argv, 13018 argv,
13019 &pending_exception); 13019 &pending_exception);
13020 if (pending_exception) return Failure::Exception(); 13020 if (pending_exception) return Failure::Exception();
13021 } 13021 }
13022 13022
13023 #ifdef DEBUG 13023 #ifdef VERIFY_HEAP
13024 if (FLAG_verify_heap) { 13024 if (FLAG_verify_heap) {
13025 cache_handle->JSFunctionResultCacheVerify(); 13025 cache_handle->JSFunctionResultCacheVerify();
13026 } 13026 }
13027 #endif 13027 #endif
13028 13028
13029 // Function invocation may have cleared the cache. Reread all the data. 13029 // Function invocation may have cleared the cache. Reread all the data.
13030 finger_index = cache_handle->finger_index(); 13030 finger_index = cache_handle->finger_index();
13031 size = cache_handle->size(); 13031 size = cache_handle->size();
13032 13032
13033 // If we have spare room, put new data into it, otherwise evict post finger 13033 // If we have spare room, put new data into it, otherwise evict post finger
(...skipping 10 matching lines...) Expand all
13044 } 13044 }
13045 13045
13046 ASSERT(index % 2 == 0); 13046 ASSERT(index % 2 == 0);
13047 ASSERT(index >= JSFunctionResultCache::kEntriesIndex); 13047 ASSERT(index >= JSFunctionResultCache::kEntriesIndex);
13048 ASSERT(index < cache_handle->length()); 13048 ASSERT(index < cache_handle->length());
13049 13049
13050 cache_handle->set(index, *key_handle); 13050 cache_handle->set(index, *key_handle);
13051 cache_handle->set(index + 1, *value); 13051 cache_handle->set(index + 1, *value);
13052 cache_handle->set_finger_index(index); 13052 cache_handle->set_finger_index(index);
13053 13053
13054 #ifdef DEBUG 13054 #ifdef VERIFY_HEAP
13055 if (FLAG_verify_heap) { 13055 if (FLAG_verify_heap) {
13056 cache_handle->JSFunctionResultCacheVerify(); 13056 cache_handle->JSFunctionResultCacheVerify();
13057 } 13057 }
13058 #endif 13058 #endif
13059 13059
13060 return *value; 13060 return *value;
13061 } 13061 }
13062 13062
13063 13063
13064 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewMessageObject) { 13064 RUNTIME_FUNCTION(MaybeObject*, Runtime_NewMessageObject) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
13279 // Handle last resort GC and make sure to allow future allocations 13279 // Handle last resort GC and make sure to allow future allocations
13280 // to grow the heap without causing GCs (if possible). 13280 // to grow the heap without causing GCs (if possible).
13281 isolate->counters()->gc_last_resort_from_js()->Increment(); 13281 isolate->counters()->gc_last_resort_from_js()->Increment();
13282 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13282 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13283 "Runtime::PerformGC"); 13283 "Runtime::PerformGC");
13284 } 13284 }
13285 } 13285 }
13286 13286
13287 13287
13288 } } // namespace v8::internal 13288 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698