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

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: Flag definition to default (false). 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
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 4bc2603c5348ba1abc59377d026412a96ef6365b..896ffad054e41f0a9a93319d86b19db0b2ae398b 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -415,4 +415,24 @@ bool ToBooleanStub::Types::CanBeUndetectable() const {
}
+void FastElementsConversionStub::Generate(MacroAssembler* masm) {
+ 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();
+ }
+}
+
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698