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

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

Issue 817143002: Contribution of PowerPC port (continuation of 422063005) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 CHECK(value->IsSmi()); 154 CHECK(value->IsSmi());
155 CHECK(value->IsNumber()); 155 CHECK(value->IsNumber());
156 CHECK_EQ(Smi::kMinValue, Handle<Smi>::cast(value)->value()); 156 CHECK_EQ(Smi::kMinValue, Handle<Smi>::cast(value)->value());
157 157
158 value = factory->NewNumberFromInt(Smi::kMaxValue); 158 value = factory->NewNumberFromInt(Smi::kMaxValue);
159 CHECK(value->IsSmi()); 159 CHECK(value->IsSmi());
160 CHECK(value->IsNumber()); 160 CHECK(value->IsNumber());
161 CHECK_EQ(Smi::kMaxValue, Handle<Smi>::cast(value)->value()); 161 CHECK_EQ(Smi::kMaxValue, Handle<Smi>::cast(value)->value());
162 162
163 #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_ARM64) && \ 163 #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_ARM64) && \
164 !defined(V8_TARGET_ARCH_MIPS64) 164 !defined(V8_TARGET_ARCH_MIPS64) && !defined(V8_TARGET_ARCH_PPC64)
Sven Panne 2015/01/08 10:13:53 Again: Simpler and more future-proof: #if V8_TARGE
michael_dawson 2015/01/08 23:51:11 Will do
165 // TODO(lrn): We need a NumberFromIntptr function in order to test this. 165 // TODO(lrn): We need a NumberFromIntptr function in order to test this.
166 value = factory->NewNumberFromInt(Smi::kMinValue - 1); 166 value = factory->NewNumberFromInt(Smi::kMinValue - 1);
167 CHECK(value->IsHeapNumber()); 167 CHECK(value->IsHeapNumber());
168 CHECK(value->IsNumber()); 168 CHECK(value->IsNumber());
169 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number()); 169 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number());
170 #endif 170 #endif
171 171
172 value = factory->NewNumberFromUint(static_cast<uint32_t>(Smi::kMaxValue) + 1); 172 value = factory->NewNumberFromUint(static_cast<uint32_t>(Smi::kMaxValue) + 1);
173 CHECK(value->IsHeapNumber()); 173 CHECK(value->IsHeapNumber());
174 CHECK(value->IsNumber()); 174 CHECK(value->IsNumber());
(...skipping 4977 matching lines...) Expand 10 before | Expand all | Expand 10 after
5152 #ifdef DEBUG 5152 #ifdef DEBUG
5153 TEST(PathTracer) { 5153 TEST(PathTracer) {
5154 CcTest::InitializeVM(); 5154 CcTest::InitializeVM();
5155 v8::HandleScope scope(CcTest::isolate()); 5155 v8::HandleScope scope(CcTest::isolate());
5156 5156
5157 v8::Local<v8::Value> result = CompileRun("'abc'"); 5157 v8::Local<v8::Value> result = CompileRun("'abc'");
5158 Handle<Object> o = v8::Utils::OpenHandle(*result); 5158 Handle<Object> o = v8::Utils::OpenHandle(*result);
5159 CcTest::i_isolate()->heap()->TracePathToObject(*o); 5159 CcTest::i_isolate()->heap()->TracePathToObject(*o);
5160 } 5160 }
5161 #endif // DEBUG 5161 #endif // DEBUG
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698