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

Unified Diff: src/code-stubs.h

Issue 8344045: Fast elements conversions in crankshaft using generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index ab582a2ba9440541ac90b2054ddd31061920289c..428fa2ec2714e9c54e66ad704922bff4054fa877 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -1030,6 +1030,11 @@ class ToBooleanStub: public CodeStub {
class FastElementsConversionStub : public CodeStub {
public:
+ enum Type {
+ TRANSITION_ONLY,
+ TRANSITION_AND_STORE
+ };
+
FastElementsConversionStub(ElementsKind from,
ElementsKind to,
bool is_jsarray,
@@ -1039,8 +1044,18 @@ class FastElementsConversionStub : public CodeStub {
is_jsarray_(is_jsarray),
strict_mode_(strict_mode) {}
+ static void GenerateSmiOnlyToDouble(
+ MacroAssembler* masm,
+ Type type,
+ StrictModeFlag strict_mode = kInvalidStrictFlag);
+
+ static void GenerateDoubleToObject(
+ MacroAssembler* masm,
+ Type type,
+ StrictModeFlag strict_mode = kInvalidStrictFlag);
+
private:
- class FromBits: public BitField<ElementsKind, 0, 8> {};
+ class FromBits: public BitField<ElementsKind, 0, 4> {};
Jakob Kummerow 2011/10/19 18:36:31 why this change? (I'm not saying it's bad; it's ju
class ToBits: public BitField<ElementsKind, 8, 8> {};
class IsJSArrayBits: public BitField<bool, 16, 8> {};
class StrictModeBits: public BitField<StrictModeFlag, 24, 8> {};
@@ -1054,11 +1069,8 @@ class FastElementsConversionStub : public CodeStub {
}
void Generate(MacroAssembler* masm);
+
static void GenerateSmiOnlyToObject(MacroAssembler* masm);
- static void GenerateSmiOnlyToDouble(MacroAssembler* masm,
- StrictModeFlag strict_mode);
- static void GenerateDoubleToObject(MacroAssembler* masm,
- StrictModeFlag strict_mode);
ElementsKind from_;
ElementsKind to_;
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/code-stubs.cc » ('j') | test/mjsunit/elements-transition.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698