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

Unified Diff: src/x64/regexp-macro-assembler-x64.cc

Issue 7084032: Add asserts and state tracking to ensure that we do not call (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 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/x64/regexp-macro-assembler-x64.cc
===================================================================
--- src/x64/regexp-macro-assembler-x64.cc (revision 8110)
+++ src/x64/regexp-macro-assembler-x64.cc (working copy)
@@ -431,10 +431,17 @@
// Isolate.
__ LoadAddress(rcx, ExternalReference::isolate_address());
#endif
- ExternalReference compare =
- ExternalReference::re_case_insensitive_compare_uc16(masm_.isolate());
- __ CallCFunction(compare, num_arguments);
+ { // NOLINT: Can't find a way to open this scope without confusing the
+ // linter.
+ // The compare function can't cause a GC. Tell the system that it is OK
+ // to call into C++ without having a stack frame in place.
+ FrameScope scope(&masm_, StackFrame::NONE);
+ ExternalReference compare =
+ ExternalReference::re_case_insensitive_compare_uc16(masm_.isolate());
+ __ CallCFunction(compare, num_arguments);
+ }
+
// Restore original values before reacting on result value.
__ Move(code_object_pointer(), masm_.CodeObject());
__ pop(backtrack_stackpointer());
@@ -708,7 +715,12 @@
// registers we need.
// Entry code:
__ bind(&entry_label_);
- // Start new stack frame.
+
+ // Tell the system that we have a stack frame. Because the type is NONE, no
+ // is generated.
+ FrameScope scope(&masm_, StackFrame::NONE);
+
+ // Actually emit code to start a new stack frame.
__ push(rbp);
__ movq(rbp, rsp);
// Save parameters and callee-save registers. Order here should correspond

Powered by Google App Engine
This is Rietveld 408576698