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

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

Issue 207553005: TransitionElementsKind() and its recursive call chain handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 years, 9 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.cc ('k') | no next file » | 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 16406 matching lines...) Expand 10 before | Expand all | Expand 10 after
16417 } 16417 }
16418 // Force GC to trigger verification. 16418 // Force GC to trigger verification.
16419 CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags); 16419 CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
16420 for (int i = 0; i < kElementCount; i++) { 16420 for (int i = 0; i < kElementCount; i++) {
16421 CHECK_EQ(static_cast<int64_t>(static_cast<ElementType>(i)), 16421 CHECK_EQ(static_cast<int64_t>(static_cast<ElementType>(i)),
16422 static_cast<int64_t>(fixed_array->get_scalar(i))); 16422 static_cast<int64_t>(fixed_array->get_scalar(i)));
16423 } 16423 }
16424 v8::Handle<v8::Object> obj = v8::Object::New(CcTest::isolate()); 16424 v8::Handle<v8::Object> obj = v8::Object::New(CcTest::isolate());
16425 i::Handle<i::JSObject> jsobj = v8::Utils::OpenHandle(*obj); 16425 i::Handle<i::JSObject> jsobj = v8::Utils::OpenHandle(*obj);
16426 i::Handle<i::Map> fixed_array_map = 16426 i::Handle<i::Map> fixed_array_map =
16427 isolate->factory()->GetElementsTransitionMap(jsobj, elements_kind); 16427 i::JSObject::GetElementsTransitionMap(jsobj, elements_kind);
16428 jsobj->set_map(*fixed_array_map); 16428 jsobj->set_map(*fixed_array_map);
16429 jsobj->set_elements(*fixed_array); 16429 jsobj->set_elements(*fixed_array);
16430 16430
16431 ObjectWithExternalArrayTestHelper<FixedTypedArrayClass, ElementType>( 16431 ObjectWithExternalArrayTestHelper<FixedTypedArrayClass, ElementType>(
16432 context.local(), obj, kElementCount, array_type, 16432 context.local(), obj, kElementCount, array_type,
16433 static_cast<int64_t>(low), 16433 static_cast<int64_t>(low),
16434 static_cast<int64_t>(high)); 16434 static_cast<int64_t>(high));
16435 } 16435 }
16436 16436
16437 16437
(...skipping 5920 matching lines...) Expand 10 before | Expand all | Expand 10 after
22358 "f.call(friend);"); 22358 "f.call(friend);");
22359 CHECK_EQ(2, named_access_count); 22359 CHECK_EQ(2, named_access_count);
22360 22360
22361 // Test access using Object.setPrototypeOf reflective method. 22361 // Test access using Object.setPrototypeOf reflective method.
22362 named_access_count = 0; 22362 named_access_count = 0;
22363 CompileRun("Object.setPrototypeOf(friend, {});"); 22363 CompileRun("Object.setPrototypeOf(friend, {});");
22364 CHECK_EQ(1, named_access_count); 22364 CHECK_EQ(1, named_access_count);
22365 CompileRun("Object.getPrototypeOf(friend);"); 22365 CompileRun("Object.getPrototypeOf(friend);");
22366 CHECK_EQ(2, named_access_count); 22366 CHECK_EQ(2, named_access_count);
22367 } 22367 }
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698