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

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

Issue 7285001: Add support for dictionary elements to polymorphic crankshaft code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: small fixes Created 9 years, 5 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/objects.h ('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 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 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 1687
1688 1688
1689 MaybeObject* KeyedLoadStubCompiler::ComputeSharedKeyedLoadElementStub( 1689 MaybeObject* KeyedLoadStubCompiler::ComputeSharedKeyedLoadElementStub(
1690 Map* receiver_map) { 1690 Map* receiver_map) {
1691 MaybeObject* maybe_stub = NULL; 1691 MaybeObject* maybe_stub = NULL;
1692 if (receiver_map->has_fast_elements()) { 1692 if (receiver_map->has_fast_elements()) {
1693 maybe_stub = KeyedLoadFastElementStub().TryGetCode(); 1693 maybe_stub = KeyedLoadFastElementStub().TryGetCode();
1694 } else if (receiver_map->has_external_array_elements()) { 1694 } else if (receiver_map->has_external_array_elements()) {
1695 JSObject::ElementsKind elements_kind = receiver_map->elements_kind(); 1695 JSObject::ElementsKind elements_kind = receiver_map->elements_kind();
1696 maybe_stub = KeyedLoadExternalArrayStub(elements_kind).TryGetCode(); 1696 maybe_stub = KeyedLoadExternalArrayStub(elements_kind).TryGetCode();
1697 } else if (receiver_map->has_dictionary_elements()) {
1698 maybe_stub = isolate()->builtins()->builtin(Builtins::kKeyedLoadIC_Slow);
1697 } else { 1699 } else {
1698 UNREACHABLE(); 1700 UNREACHABLE();
1699 } 1701 }
1700 return maybe_stub; 1702 return maybe_stub;
1701 } 1703 }
1702 1704
1703 1705
1704 MaybeObject* StoreStubCompiler::GetCode(PropertyType type, String* name) { 1706 MaybeObject* StoreStubCompiler::GetCode(PropertyType type, String* name) {
1705 Code::Flags flags = Code::ComputeMonomorphicFlags( 1707 Code::Flags flags = Code::ComputeMonomorphicFlags(
1706 Code::STORE_IC, type, strict_mode_); 1708 Code::STORE_IC, type, strict_mode_);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1739 1741
1740 MaybeObject* KeyedStoreStubCompiler::ComputeSharedKeyedStoreElementStub( 1742 MaybeObject* KeyedStoreStubCompiler::ComputeSharedKeyedStoreElementStub(
1741 Map* receiver_map) { 1743 Map* receiver_map) {
1742 MaybeObject* maybe_stub = NULL; 1744 MaybeObject* maybe_stub = NULL;
1743 if (receiver_map->has_fast_elements()) { 1745 if (receiver_map->has_fast_elements()) {
1744 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 1746 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
1745 maybe_stub = KeyedStoreFastElementStub(is_js_array).TryGetCode(); 1747 maybe_stub = KeyedStoreFastElementStub(is_js_array).TryGetCode();
1746 } else if (receiver_map->has_external_array_elements()) { 1748 } else if (receiver_map->has_external_array_elements()) {
1747 JSObject::ElementsKind elements_kind = receiver_map->elements_kind(); 1749 JSObject::ElementsKind elements_kind = receiver_map->elements_kind();
1748 maybe_stub = KeyedStoreExternalArrayStub(elements_kind).TryGetCode(); 1750 maybe_stub = KeyedStoreExternalArrayStub(elements_kind).TryGetCode();
1751 } else if (receiver_map->has_dictionary_elements()) {
1752 maybe_stub = isolate()->builtins()->builtin(Builtins::kKeyedStoreIC_Slow);
1749 } else { 1753 } else {
1750 UNREACHABLE(); 1754 UNREACHABLE();
1751 } 1755 }
1752 return maybe_stub; 1756 return maybe_stub;
1753 } 1757 }
1754 1758
1755 1759
1756 CallStubCompiler::CallStubCompiler(int argc, 1760 CallStubCompiler::CallStubCompiler(int argc,
1757 InLoopFlag in_loop, 1761 InLoopFlag in_loop,
1758 Code::Kind kind, 1762 Code::Kind kind,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 expected_receiver_type_ = 1914 expected_receiver_type_ =
1911 FunctionTemplateInfo::cast(signature->receiver()); 1915 FunctionTemplateInfo::cast(signature->receiver());
1912 } 1916 }
1913 } 1917 }
1914 1918
1915 is_simple_api_call_ = true; 1919 is_simple_api_call_ = true;
1916 } 1920 }
1917 1921
1918 1922
1919 } } // namespace v8::internal 1923 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698