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

Side by Side Diff: src/ic.cc

Issue 8355035: Refactor elements kind conversion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Bugfix Created 9 years, 2 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/ia32/ic-ia32.cc ('k') | src/x64/code-stubs-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 MapList* receiver_maps, 1679 MapList* receiver_maps,
1680 StrictModeFlag strict_mode) { 1680 StrictModeFlag strict_mode) {
1681 // Collect MONOMORPHIC stubs for all target_receiver_maps. 1681 // Collect MONOMORPHIC stubs for all target_receiver_maps.
1682 CodeList handler_ics(receiver_maps->length()); 1682 CodeList handler_ics(receiver_maps->length());
1683 MapList transitioned_maps(receiver_maps->length()); 1683 MapList transitioned_maps(receiver_maps->length());
1684 for (int i = 0; i < receiver_maps->length(); ++i) { 1684 for (int i = 0; i < receiver_maps->length(); ++i) {
1685 Map* receiver_map(receiver_maps->at(i)); 1685 Map* receiver_map(receiver_maps->at(i));
1686 MaybeObject* maybe_cached_stub = NULL; 1686 MaybeObject* maybe_cached_stub = NULL;
1687 Map* transitioned_map = receiver_map->FindTransitionedMap(receiver_maps); 1687 Map* transitioned_map = receiver_map->FindTransitionedMap(receiver_maps);
1688 if (transitioned_map != NULL) { 1688 if (transitioned_map != NULL) {
1689 maybe_cached_stub = FastElementsConversionStub( 1689 maybe_cached_stub = ElementsTransitionAndStoreStub(
1690 receiver_map->elements_kind(), // original elements_kind 1690 receiver_map->elements_kind(), // original elements_kind
1691 transitioned_map->elements_kind(), 1691 transitioned_map->elements_kind(),
1692 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array 1692 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array
1693 strict_mode).TryGetCode(); 1693 strict_mode).TryGetCode();
1694 } else { 1694 } else {
1695 maybe_cached_stub = ComputeMonomorphicStubWithoutMapCheck( 1695 maybe_cached_stub = ComputeMonomorphicStubWithoutMapCheck(
1696 receiver_map, strict_mode); 1696 receiver_map, strict_mode);
1697 } 1697 }
1698 Code* cached_stub; 1698 Code* cached_stub;
1699 if (!maybe_cached_stub->To(&cached_stub)) return maybe_cached_stub; 1699 if (!maybe_cached_stub->To(&cached_stub)) return maybe_cached_stub;
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 #undef ADDR 2497 #undef ADDR
2498 }; 2498 };
2499 2499
2500 2500
2501 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2501 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2502 return IC_utilities[id]; 2502 return IC_utilities[id];
2503 } 2503 }
2504 2504
2505 2505
2506 } } // namespace v8::internal 2506 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698