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

Side by Side Diff: src/stub-cache.cc

Issue 140703002: Merged r18483, r18484 into 3.23 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.23
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 | « src/store-buffer.cc ('k') | src/version.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 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 1660
1661 1661
1662 void KeyedLoadStubCompiler::CompileElementHandlers(MapHandleList* receiver_maps, 1662 void KeyedLoadStubCompiler::CompileElementHandlers(MapHandleList* receiver_maps,
1663 CodeHandleList* handlers) { 1663 CodeHandleList* handlers) {
1664 for (int i = 0; i < receiver_maps->length(); ++i) { 1664 for (int i = 0; i < receiver_maps->length(); ++i) {
1665 Handle<Map> receiver_map = receiver_maps->at(i); 1665 Handle<Map> receiver_map = receiver_maps->at(i);
1666 Handle<Code> cached_stub; 1666 Handle<Code> cached_stub;
1667 1667
1668 if ((receiver_map->instance_type() & kNotStringTag) == 0) { 1668 if ((receiver_map->instance_type() & kNotStringTag) == 0) {
1669 cached_stub = isolate()->builtins()->KeyedLoadIC_String(); 1669 cached_stub = isolate()->builtins()->KeyedLoadIC_String();
1670 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) {
1671 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow();
1670 } else { 1672 } else {
1671 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 1673 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
1672 ElementsKind elements_kind = receiver_map->elements_kind(); 1674 ElementsKind elements_kind = receiver_map->elements_kind();
1673 1675
1674 if (IsFastElementsKind(elements_kind) || 1676 if (IsFastElementsKind(elements_kind) ||
1675 IsExternalArrayElementsKind(elements_kind)) { 1677 IsExternalArrayElementsKind(elements_kind)) {
1676 cached_stub = 1678 cached_stub =
1677 KeyedLoadFastElementStub(is_js_array, 1679 KeyedLoadFastElementStub(is_js_array,
1678 elements_kind).GetCode(isolate()); 1680 elements_kind).GetCode(isolate());
1679 } else { 1681 } else {
(...skipping 24 matching lines...) Expand all
1704 // to be. Not all the elements are in place yet, pessimistic elements 1706 // to be. Not all the elements are in place yet, pessimistic elements
1705 // transitions are still important for performance. 1707 // transitions are still important for performance.
1706 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 1708 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
1707 ElementsKind elements_kind = receiver_map->elements_kind(); 1709 ElementsKind elements_kind = receiver_map->elements_kind();
1708 if (!transitioned_map.is_null()) { 1710 if (!transitioned_map.is_null()) {
1709 cached_stub = ElementsTransitionAndStoreStub( 1711 cached_stub = ElementsTransitionAndStoreStub(
1710 elements_kind, 1712 elements_kind,
1711 transitioned_map->elements_kind(), 1713 transitioned_map->elements_kind(),
1712 is_js_array, 1714 is_js_array,
1713 store_mode()).GetCode(isolate()); 1715 store_mode()).GetCode(isolate());
1716 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) {
1717 cached_stub = isolate()->builtins()->KeyedStoreIC_Slow();
1714 } else { 1718 } else {
1715 if (receiver_map->has_fast_elements() || 1719 if (receiver_map->has_fast_elements() ||
1716 receiver_map->has_external_array_elements()) { 1720 receiver_map->has_external_array_elements()) {
1717 cached_stub = KeyedStoreFastElementStub( 1721 cached_stub = KeyedStoreFastElementStub(
1718 is_js_array, 1722 is_js_array,
1719 elements_kind, 1723 elements_kind,
1720 store_mode()).GetCode(isolate()); 1724 store_mode()).GetCode(isolate());
1721 } else { 1725 } else {
1722 cached_stub = KeyedStoreElementStub( 1726 cached_stub = KeyedStoreElementStub(
1723 is_js_array, 1727 is_js_array,
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 Handle<FunctionTemplateInfo>( 1904 Handle<FunctionTemplateInfo>(
1901 FunctionTemplateInfo::cast(signature->receiver())); 1905 FunctionTemplateInfo::cast(signature->receiver()));
1902 } 1906 }
1903 } 1907 }
1904 1908
1905 is_simple_api_call_ = true; 1909 is_simple_api_call_ = true;
1906 } 1910 }
1907 1911
1908 1912
1909 } } // namespace v8::internal 1913 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/store-buffer.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698