Index: src/mips/code-stubs-mips.h |
diff --git a/src/mips/code-stubs-mips.h b/src/mips/code-stubs-mips.h |
index d1307b5a859d9c7b5fd0eeb97f26276395e00976..3f0b1508c3c712f2ae0cc33488999c2ad5cec485 100644 |
--- a/src/mips/code-stubs-mips.h |
+++ b/src/mips/code-stubs-mips.h |
@@ -456,6 +456,27 @@ class RegExpCEntryStub: public CodeStub { |
const char* GetName() { return "RegExpCEntryStub"; } |
}; |
+// Trampoline stub to call into native code. To call safely into native code |
+// in the presence of compacting GC (which can move code objects) we need to |
+// keep the code which called into native pinned in the memory. Currently the |
+// simplest approach is to generate such stub early enough so it can never be |
+// moved by GC |
+class DirectCEntryStub: public CodeStub { |
+ public: |
+ DirectCEntryStub() {} |
+ void Generate(MacroAssembler* masm); |
+ void GenerateCall(MacroAssembler* masm, |
+ ExternalReference function); |
+ void GenerateCall(MacroAssembler* masm, Register target); |
+ |
+ private: |
+ Major MajorKey() { return DirectCEntry; } |
+ int MinorKey() { return 0; } |
+ |
+ bool NeedsImmovableCode() { return true; } |
+ |
+ const char* GetName() { return "DirectCEntryStub"; } |
+}; |
class FloatingPointHelper : public AllStatic { |
public: |
@@ -608,13 +629,14 @@ class StringDictionaryLookupStub: public CodeStub { |
void Generate(MacroAssembler* masm); |
- static void GenerateNegativeLookup(MacroAssembler* masm, |
- Label* miss, |
- Label* done, |
- Register receiver, |
- Register properties, |
- String* name, |
- Register scratch0) ; |
+ MUST_USE_RESULT static MaybeObject* GenerateNegativeLookup( |
+ MacroAssembler* masm, |
+ Label* miss, |
+ Label* done, |
+ Register receiver, |
+ Register properties, |
+ String* name, |
+ Register scratch0); |
static void GeneratePositiveLookup(MacroAssembler* masm, |
Label* miss, |