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

Side by Side Diff: src/runtime.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.h ('k') | src/serialize.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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 9933 matching lines...) Expand 10 before | Expand all | Expand 10 after
9944 ASSERT(args.length() == 2); 9944 ASSERT(args.length() == 2);
9945 OS::PrintError("abort: %s\n", reinterpret_cast<char*>(args[0]) + 9945 OS::PrintError("abort: %s\n", reinterpret_cast<char*>(args[0]) +
9946 Smi::cast(args[1])->value()); 9946 Smi::cast(args[1])->value());
9947 Top::PrintStack(); 9947 Top::PrintStack();
9948 OS::Abort(); 9948 OS::Abort();
9949 UNREACHABLE(); 9949 UNREACHABLE();
9950 return NULL; 9950 return NULL;
9951 } 9951 }
9952 9952
9953 9953
9954 static Object* Runtime_DeleteHandleScopeExtensions(Arguments args) {
9955 ASSERT(args.length() == 0);
9956 HandleScope::DeleteExtensions();
9957 return Heap::undefined_value();
9958 }
9959
9960
9961 static Object* CacheMiss(FixedArray* cache_obj, int index, Object* key_obj) { 9954 static Object* CacheMiss(FixedArray* cache_obj, int index, Object* key_obj) {
9962 ASSERT(index % 2 == 0); // index of the key 9955 ASSERT(index % 2 == 0); // index of the key
9963 ASSERT(index >= JSFunctionResultCache::kEntriesIndex); 9956 ASSERT(index >= JSFunctionResultCache::kEntriesIndex);
9964 ASSERT(index < cache_obj->length()); 9957 ASSERT(index < cache_obj->length());
9965 9958
9966 HandleScope scope; 9959 HandleScope scope;
9967 9960
9968 Handle<FixedArray> cache(cache_obj); 9961 Handle<FixedArray> cache(cache_obj);
9969 Handle<Object> key(key_obj); 9962 Handle<Object> key(key_obj);
9970 Handle<JSFunction> factory(JSFunction::cast( 9963 Handle<JSFunction> factory(JSFunction::cast(
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
10157 } else { 10150 } else {
10158 // Handle last resort GC and make sure to allow future allocations 10151 // Handle last resort GC and make sure to allow future allocations
10159 // to grow the heap without causing GCs (if possible). 10152 // to grow the heap without causing GCs (if possible).
10160 Counters::gc_last_resort_from_js.Increment(); 10153 Counters::gc_last_resort_from_js.Increment();
10161 Heap::CollectAllGarbage(false); 10154 Heap::CollectAllGarbage(false);
10162 } 10155 }
10163 } 10156 }
10164 10157
10165 10158
10166 } } // namespace v8::internal 10159 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698