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

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: 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
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 if (value->IsFailure()) { OS::DebugBreak(); }
Erik Corry 2011/05/19 07:22:32 This looks like an accidental edit.
Lasse Reichstein 2011/05/19 08:40:40 Ack, yes. Shouldn't happen any more. I'll keep the
596 RUNTIME_ASSERT(!value->IsFailure());
595 // Create a catch context extension object. 597 // Create a catch context extension object.
596 JSFunction* constructor = 598 JSFunction* constructor =
597 isolate->context()->global_context()-> 599 isolate->context()->global_context()->
598 context_extension_function(); 600 context_extension_function();
599 Object* object; 601 Object* object;
600 { MaybeObject* maybe_object = isolate->heap()->AllocateJSObject(constructor); 602 { MaybeObject* maybe_object = isolate->heap()->AllocateJSObject(constructor);
601 if (!maybe_object->ToObject(&object)) return maybe_object; 603 if (!maybe_object->ToObject(&object)) return maybe_object;
602 } 604 }
603 // Assign the exception value to the catch variable and make sure 605 // Assign the exception value to the catch variable and make sure
604 // that the catch variable is DontDelete. 606 // that the catch variable is DontDelete.
(...skipping 11586 matching lines...) Expand 10 before | Expand all | Expand 10 after
12191 } else { 12193 } else {
12192 // Handle last resort GC and make sure to allow future allocations 12194 // Handle last resort GC and make sure to allow future allocations
12193 // to grow the heap without causing GCs (if possible). 12195 // to grow the heap without causing GCs (if possible).
12194 isolate->counters()->gc_last_resort_from_js()->Increment(); 12196 isolate->counters()->gc_last_resort_from_js()->Increment();
12195 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags); 12197 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags);
12196 } 12198 }
12197 } 12199 }
12198 12200
12199 12201
12200 } } // namespace v8::internal 12202 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698