Update V8 to r7427: Initial merge by git
As required by WebKit r82507
Change-Id: I7ae83ef3f689356043b4929255b7c1dd31d8c5df
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 96ac733..d408034 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -40,7 +40,6 @@
V(GenericBinaryOp) \
V(TypeRecordingBinaryOp) \
V(StringAdd) \
- V(StringCharAt) \
V(SubString) \
V(StringCompare) \
V(SmiOp) \
@@ -81,10 +80,19 @@
#define CODE_STUB_LIST_ARM(V)
#endif
+// List of code stubs only used on MIPS platforms.
+#ifdef V8_TARGET_ARCH_MIPS
+#define CODE_STUB_LIST_MIPS(V) \
+ V(RegExpCEntry)
+#else
+#define CODE_STUB_LIST_MIPS(V)
+#endif
+
// Combined list of code stubs.
#define CODE_STUB_LIST(V) \
CODE_STUB_LIST_ALL_PLATFORMS(V) \
- CODE_STUB_LIST_ARM(V)
+ CODE_STUB_LIST_ARM(V) \
+ CODE_STUB_LIST_MIPS(V)
// Mode to overwrite BinaryExpression values.
enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
@@ -167,7 +175,11 @@
// Returns a name for logging/debugging purposes.
virtual const char* GetName() { return MajorName(MajorKey(), false); }
-#ifdef DEBUG
+ // Returns whether the code generated for this stub needs to be allocated as
+ // a fixed (non-moveable) code object.
+ virtual bool NeedsImmovableCode() { return false; }
+
+ #ifdef DEBUG
virtual void Print() { PrintF("%s\n", GetName()); }
#endif
@@ -274,12 +286,17 @@
class FastNewClosureStub : public CodeStub {
public:
+ explicit FastNewClosureStub(StrictModeFlag strict_mode)
+ : strict_mode_(strict_mode) { }
+
void Generate(MacroAssembler* masm);
private:
const char* GetName() { return "FastNewClosureStub"; }
Major MajorKey() { return FastNewClosure; }
- int MinorKey() { return 0; }
+ int MinorKey() { return strict_mode_; }
+
+ StrictModeFlag strict_mode_;
};
@@ -434,18 +451,6 @@
};
-class StringCharAtStub: public CodeStub {
- public:
- StringCharAtStub() {}
-
- private:
- Major MajorKey() { return StringCharAt; }
- int MinorKey() { return 0; }
-
- void Generate(MacroAssembler* masm);
-};
-
-
class ICCompareStub: public CodeStub {
public:
ICCompareStub(Token::Value op, CompareIC::State state)
@@ -623,6 +628,8 @@
Major MajorKey() { return CEntry; }
int MinorKey();
+ bool NeedsImmovableCode();
+
const char* GetName() { return "CEntryStub"; }
};
@@ -661,7 +668,8 @@
public:
enum Type {
READ_ELEMENT,
- NEW_OBJECT
+ NEW_NON_STRICT,
+ NEW_STRICT
};
explicit ArgumentsAccessStub(Type type) : type_(type) { }
@@ -676,6 +684,19 @@
void GenerateReadElement(MacroAssembler* masm);
void GenerateNewObject(MacroAssembler* masm);
+ int GetArgumentsBoilerplateIndex() const {
+ return (type_ == NEW_STRICT)
+ ? Context::STRICT_MODE_ARGUMENTS_BOILERPLATE_INDEX
+ : Context::ARGUMENTS_BOILERPLATE_INDEX;
+ }
+
+ int GetArgumentsObjectSize() const {
+ if (type_ == NEW_STRICT)
+ return Heap::kArgumentsObjectSizeStrict;
+ else
+ return Heap::kArgumentsObjectSize;
+ }
+
const char* GetName() { return "ArgumentsAccessStub"; }
#ifdef DEBUG