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

Side by Side Diff: src/builtins.cc

Issue 6321008: Introduce conservative sweeping. (Closed) Base URL: https://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 | « no previous file | src/mark-compact.h » ('j') | src/mark-compact.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 14 matching lines...) Expand all
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "api.h" 30 #include "api.h"
31 #include "arguments.h" 31 #include "arguments.h"
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "builtins.h" 33 #include "builtins.h"
34 #include "ic-inl.h" 34 #include "ic-inl.h"
35 #include "mark-compact.h"
35 #include "vm-state-inl.h" 36 #include "vm-state-inl.h"
36 37
37 namespace v8 { 38 namespace v8 {
38 namespace internal { 39 namespace internal {
39 40
40 namespace { 41 namespace {
41 42
42 // Arguments object passed to C++ builtins. 43 // Arguments object passed to C++ builtins.
43 template <BuiltinExtraArguments extra_args> 44 template <BuiltinExtraArguments extra_args>
44 class BuiltinArguments : public Arguments { 45 class BuiltinArguments : public Arguments {
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 zap++; // Header of filler must be at least one word so skip that. 344 zap++; // Header of filler must be at least one word so skip that.
344 for (int i = 1; i < to_trim; i++) { 345 for (int i = 1; i < to_trim; i++) {
345 *zap++ = Smi::FromInt(0); 346 *zap++ = Smi::FromInt(0);
346 } 347 }
347 } 348 }
348 // Technically in new space this write might be omitted (except for 349 // Technically in new space this write might be omitted (except for
349 // debug mode which iterates through the heap), but to play safer 350 // debug mode which iterates through the heap), but to play safer
350 // we still do it. 351 // we still do it.
351 Heap::CreateFillerObjectAt(elms->address(), to_trim * kPointerSize); 352 Heap::CreateFillerObjectAt(elms->address(), to_trim * kPointerSize);
352 353
354 Marking::TransferMark(elms->address(),
Erik Corry 2011/01/19 13:46:48 Comment?
Vyacheslav Egorov (Chromium) 2011/01/20 16:40:21 Done.
355 elms->address() + to_trim * kPointerSize);
356
353 former_start[to_trim] = Heap::fixed_array_map(); 357 former_start[to_trim] = Heap::fixed_array_map();
354 former_start[to_trim + 1] = Smi::FromInt(len - to_trim); 358 former_start[to_trim + 1] = Smi::FromInt(len - to_trim);
355 359
356 return FixedArray::cast(HeapObject::FromAddress( 360 return FixedArray::cast(HeapObject::FromAddress(
357 elms->address() + to_trim * kPointerSize)); 361 elms->address() + to_trim * kPointerSize));
358 } 362 }
359 363
360 364
361 static bool ArrayPrototypeHasNoElements(Context* global_context, 365 static bool ArrayPrototypeHasNoElements(Context* global_context,
362 JSObject* array_proto) { 366 JSObject* array_proto) {
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 if (entry->contains(pc)) { 1601 if (entry->contains(pc)) {
1598 return names_[i]; 1602 return names_[i];
1599 } 1603 }
1600 } 1604 }
1601 } 1605 }
1602 return NULL; 1606 return NULL;
1603 } 1607 }
1604 1608
1605 1609
1606 } } // namespace v8::internal 1610 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mark-compact.h » ('j') | src/mark-compact.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698