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

Unified Diff: src/code-stubs.cc

Issue 8241003: Elements kind conversion in generated code (ia32). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Applied suggested changes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 4bc2603c5348ba1abc59377d026412a96ef6365b..78585d8f642d8ee044117d1791e5c85b329025e4 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -415,4 +415,28 @@ bool ToBooleanStub::Types::CanBeUndetectable() const {
}
+void FastElementsConversionStub::Generate(MacroAssembler* masm) {
+#if defined(V8_TARGET_ARCH_IA32)
+ if (to_ == FAST_ELEMENTS) {
+ if (from_ == FAST_SMI_ONLY_ELEMENTS) {
+ GenerateSmiOnlyToObject(masm);
+ } else if (from_ == FAST_DOUBLE_ELEMENTS) {
+ GenerateDoubleToObject(masm, strict_mode_);
+ } else {
+ UNREACHABLE();
+ }
+ KeyedStoreStubCompiler::GenerateStoreFastElement(masm,
+ is_jsarray_,
+ FAST_ELEMENTS);
+ } else if (from_ == FAST_SMI_ONLY_ELEMENTS && to_ == FAST_DOUBLE_ELEMENTS) {
+ GenerateSmiOnlyToDouble(masm, strict_mode_);
+ KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_);
+ } else {
+ UNREACHABLE();
+ }
+#else
+ KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_);
+#endif // V8_TARGET_ARCH_IA32
+}
+
} } // namespace v8::internal
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698