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

Side by Side Diff: test/cctest/test-heap.cc

Issue 143003013: Initial patch for a64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | « test/cctest/test-hashing.cc ('k') | test/cctest/test-regexp.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 value = heap->NumberFromInt32(Smi::kMinValue)->ToObjectChecked(); 168 value = heap->NumberFromInt32(Smi::kMinValue)->ToObjectChecked();
169 CHECK(value->IsSmi()); 169 CHECK(value->IsSmi());
170 CHECK(value->IsNumber()); 170 CHECK(value->IsNumber());
171 CHECK_EQ(Smi::kMinValue, Smi::cast(value)->value()); 171 CHECK_EQ(Smi::kMinValue, Smi::cast(value)->value());
172 172
173 value = heap->NumberFromInt32(Smi::kMaxValue)->ToObjectChecked(); 173 value = heap->NumberFromInt32(Smi::kMaxValue)->ToObjectChecked();
174 CHECK(value->IsSmi()); 174 CHECK(value->IsSmi());
175 CHECK(value->IsNumber()); 175 CHECK(value->IsNumber());
176 CHECK_EQ(Smi::kMaxValue, Smi::cast(value)->value()); 176 CHECK_EQ(Smi::kMaxValue, Smi::cast(value)->value());
177 177
178 #ifndef V8_TARGET_ARCH_X64 178 #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_A64)
179 // TODO(lrn): We need a NumberFromIntptr function in order to test this. 179 // TODO(lrn): We need a NumberFromIntptr function in order to test this.
180 value = heap->NumberFromInt32(Smi::kMinValue - 1)->ToObjectChecked(); 180 value = heap->NumberFromInt32(Smi::kMinValue - 1)->ToObjectChecked();
181 CHECK(value->IsHeapNumber()); 181 CHECK(value->IsHeapNumber());
182 CHECK(value->IsNumber()); 182 CHECK(value->IsNumber());
183 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number()); 183 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number());
184 #endif 184 #endif
185 185
186 MaybeObject* maybe_value = 186 MaybeObject* maybe_value =
187 heap->NumberFromUint32(static_cast<uint32_t>(Smi::kMaxValue) + 1); 187 heap->NumberFromUint32(static_cast<uint32_t>(Smi::kMaxValue) + 1);
188 value = maybe_value->ToObjectChecked(); 188 value = maybe_value->ToObjectChecked();
(...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 " var a = new Array(n);" 3171 " var a = new Array(n);"
3172 " for (var i = 0; i < n; i += 100) a[i] = i;" 3172 " for (var i = 0; i < n; i += 100) a[i] = i;"
3173 "};" 3173 "};"
3174 "f(10 * 1024 * 1024);"); 3174 "f(10 * 1024 * 1024);");
3175 IncrementalMarking* marking = HEAP->incremental_marking(); 3175 IncrementalMarking* marking = HEAP->incremental_marking();
3176 if (marking->IsStopped()) marking->Start(); 3176 if (marking->IsStopped()) marking->Start();
3177 // This big step should be sufficient to mark the whole array. 3177 // This big step should be sufficient to mark the whole array.
3178 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); 3178 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3179 ASSERT(marking->IsComplete()); 3179 ASSERT(marking->IsComplete());
3180 } 3180 }
OLDNEW
« no previous file with comments | « test/cctest/test-hashing.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698