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

Side by Side Diff: src/runtime.cc

Issue 7029030: Use page header information to test for InNewSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Addressed review comments. Created 9 years, 7 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 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 isolate->counters()->cow_arrays_created_runtime()->Increment(); 585 isolate->counters()->cow_arrays_created_runtime()->Increment();
586 } 586 }
587 return isolate->heap()->CopyJSObject(JSObject::cast(*boilerplate)); 587 return isolate->heap()->CopyJSObject(JSObject::cast(*boilerplate));
588 } 588 }
589 589
590 590
591 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCatchExtensionObject) { 591 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateCatchExtensionObject) {
592 ASSERT(args.length() == 2); 592 ASSERT(args.length() == 2);
593 CONVERT_CHECKED(String, key, args[0]); 593 CONVERT_CHECKED(String, key, args[0]);
594 Object* value = args[1]; 594 Object* value = args[1];
595 RUNTIME_ASSERT(!value->IsFailure());
595 // Create a catch context extension object. 596 // Create a catch context extension object.
596 JSFunction* constructor = 597 JSFunction* constructor =
597 isolate->context()->global_context()-> 598 isolate->context()->global_context()->
598 context_extension_function(); 599 context_extension_function();
599 Object* object; 600 Object* object;
600 { MaybeObject* maybe_object = isolate->heap()->AllocateJSObject(constructor); 601 { MaybeObject* maybe_object = isolate->heap()->AllocateJSObject(constructor);
601 if (!maybe_object->ToObject(&object)) return maybe_object; 602 if (!maybe_object->ToObject(&object)) return maybe_object;
602 } 603 }
603 // Assign the exception value to the catch variable and make sure 604 // Assign the exception value to the catch variable and make sure
604 // that the catch variable is DontDelete. 605 // that the catch variable is DontDelete.
(...skipping 11586 matching lines...) Expand 10 before | Expand all | Expand 10 after
12191 } else { 12192 } else {
12192 // Handle last resort GC and make sure to allow future allocations 12193 // Handle last resort GC and make sure to allow future allocations
12193 // to grow the heap without causing GCs (if possible). 12194 // to grow the heap without causing GCs (if possible).
12194 isolate->counters()->gc_last_resort_from_js()->Increment(); 12195 isolate->counters()->gc_last_resort_from_js()->Increment();
12195 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags); 12196 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags);
12196 } 12197 }
12197 } 12198 }
12198 12199
12199 12200
12200 } } // namespace v8::internal 12201 } } // 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