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

Side by Side Diff: src/runtime.cc

Issue 7631020: Version 3.5.6. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 4 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/preparser-api.cc ('k') | src/scanner-base.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 11356 matching lines...) Expand 10 before | Expand all | Expand 10 after
11367 new_current = 11367 new_current =
11368 isolate->factory()->NewCatchContext(function, 11368 isolate->factory()->NewCatchContext(function,
11369 new_previous, 11369 new_previous,
11370 name, 11370 name,
11371 thrown_object); 11371 thrown_object);
11372 } else if (current->IsBlockContext()) { 11372 } else if (current->IsBlockContext()) {
11373 Handle<SerializedScopeInfo> scope_info( 11373 Handle<SerializedScopeInfo> scope_info(
11374 SerializedScopeInfo::cast(current->extension())); 11374 SerializedScopeInfo::cast(current->extension()));
11375 new_current = 11375 new_current =
11376 isolate->factory()->NewBlockContext(function, new_previous, scope_info); 11376 isolate->factory()->NewBlockContext(function, new_previous, scope_info);
11377 // Copy context slots.
11378 int num_context_slots = scope_info->NumberOfContextSlots();
11379 for (int i = Context::MIN_CONTEXT_SLOTS; i < num_context_slots; ++i) {
11380 new_current->set(i, current->get(i));
11381 }
11377 } else { 11382 } else {
11378 ASSERT(current->IsWithContext()); 11383 ASSERT(current->IsWithContext());
11379 Handle<JSObject> extension(JSObject::cast(current->extension())); 11384 Handle<JSObject> extension(JSObject::cast(current->extension()));
11380 new_current = 11385 new_current =
11381 isolate->factory()->NewWithContext(function, new_previous, extension); 11386 isolate->factory()->NewWithContext(function, new_previous, extension);
11382 } 11387 }
11383 return scope.CloseAndEscape(new_current); 11388 return scope.CloseAndEscape(new_current);
11384 } 11389 }
11385 11390
11386 11391
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
12905 } else { 12910 } else {
12906 // Handle last resort GC and make sure to allow future allocations 12911 // Handle last resort GC and make sure to allow future allocations
12907 // to grow the heap without causing GCs (if possible). 12912 // to grow the heap without causing GCs (if possible).
12908 isolate->counters()->gc_last_resort_from_js()->Increment(); 12913 isolate->counters()->gc_last_resort_from_js()->Increment();
12909 isolate->heap()->CollectAllGarbage(false); 12914 isolate->heap()->CollectAllGarbage(false);
12910 } 12915 }
12911 } 12916 }
12912 12917
12913 12918
12914 } } // namespace v8::internal 12919 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/preparser-api.cc ('k') | src/scanner-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698