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

Side by Side Diff: src/runtime.cc

Issue 6092007: Write buffer based write barrier for IA32 and Crankshaft. Currently... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 11 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 5382 matching lines...) Expand 10 before | Expand all | Expand 10 after
5393 double value = HeapNumber::cast(obj)->value(); 5393 double value = HeapNumber::cast(obj)->value();
5394 int int_value = FastD2I(value); 5394 int int_value = FastD2I(value);
5395 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) { 5395 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) {
5396 return Smi::FromInt(int_value); 5396 return Smi::FromInt(int_value);
5397 } 5397 }
5398 } 5398 }
5399 return Heap::nan_value(); 5399 return Heap::nan_value();
5400 } 5400 }
5401 5401
5402 5402
5403 static MaybeObject* Runtime_WriteBufferOverflow(Arguments args) {
5404 WriteBuffer::Compact();
5405 return Heap::undefined_value();
5406 }
5407
5408
5403 static MaybeObject* Runtime_AllocateHeapNumber(Arguments args) { 5409 static MaybeObject* Runtime_AllocateHeapNumber(Arguments args) {
5404 NoHandleAllocation ha; 5410 NoHandleAllocation ha;
5405 ASSERT(args.length() == 0); 5411 ASSERT(args.length() == 0);
5406 return Heap::AllocateHeapNumber(0); 5412 return Heap::AllocateHeapNumber(0);
5407 } 5413 }
5408 5414
5409 5415
5410 static MaybeObject* Runtime_NumberAdd(Arguments args) { 5416 static MaybeObject* Runtime_NumberAdd(Arguments args) {
5411 NoHandleAllocation ha; 5417 NoHandleAllocation ha;
5412 ASSERT(args.length() == 2); 5418 ASSERT(args.length() == 2);
(...skipping 5383 matching lines...) Expand 10 before | Expand all | Expand 10 after
10796 } else { 10802 } else {
10797 // Handle last resort GC and make sure to allow future allocations 10803 // Handle last resort GC and make sure to allow future allocations
10798 // to grow the heap without causing GCs (if possible). 10804 // to grow the heap without causing GCs (if possible).
10799 Counters::gc_last_resort_from_js.Increment(); 10805 Counters::gc_last_resort_from_js.Increment();
10800 Heap::CollectAllGarbage(false); 10806 Heap::CollectAllGarbage(false);
10801 } 10807 }
10802 } 10808 }
10803 10809
10804 10810
10805 } } // namespace v8::internal 10811 } } // 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