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

Unified Diff: src/mips/macro-assembler-mips.cc

Issue 2841913003: [WIP] Initial CallFunctionCallback builtin.
Patch Set: Fix wrong register for arm64. Created 3 years, 8 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
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index dec879ed2b8ebd2cb1f8a0d2ddffd1fce735f4af..b2c9c1027c82361aca3d51ec7652f7d052035e5f 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -5856,6 +5856,33 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
}
+void MacroAssembler::AssertApiCallResult(Register object) {
+ if (emit_debug_code()) {
+ Label done_checking;
+ Push(object);
+
+ // Check for Smis.
+ JumpIfSmi(object, &done_checking);
+
+ // Check for valid Oddballs.
+ JumpIfRoot(object, Heap::kTrueValueRootIndex, &done_checking);
+ JumpIfRoot(object, Heap::kFalseValueRootIndex, &done_checking);
+ JumpIfRoot(object, Heap::kNullValueRootIndex, &done_checking);
+ JumpIfRoot(object, Heap::kUndefinedValueRootIndex, &done_checking);
+
+ // Check for other primitives (String, Symbol and HeapNumber).
+ STATIC_ASSERT(LAST_PRIMITIVE_TYPE == ODDBALL_TYPE);
+ GetObjectType(object, object, object);
+ Branch(&done_checking, lo, object, Operand(LAST_PRIMITIVE_TYPE));
+
+ // Check for JSReceivers.
+ Check(hs, kAPICallReturnedInvalidObject, object,
+ Operand(FIRST_JS_RECEIVER_TYPE));
+
+ bind(&done_checking);
+ Pop(object);
+ }
+}
void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
if (emit_debug_code()) {
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698