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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 2801008: Port faster callbacks invocation to x64. (Closed)
Patch Set: Minor cosmetic changes Created 10 years, 5 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 | « no previous file | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
index 9a11075797c504b05be4f763819bbb76c027a031..fd064c11ec648ecf4054e7bf2aef4449446bb354 100644
--- a/src/ia32/codegen-ia32.cc
+++ b/src/ia32/codegen-ia32.cc
@@ -12275,7 +12275,7 @@ static const bool kPassHandlesDirectly = false;
void ApiGetterEntryStub::Generate(MacroAssembler* masm) {
- Label get_result;
+ Label empty_handle;
Label prologue;
Label promote_scheduled_exception;
__ EnterApiExitFrame(ExitFrame::MODE_NORMAL, kStackSpace, kArgc);
@@ -12318,20 +12318,20 @@ void ApiGetterEntryStub::Generate(MacroAssembler* masm) {
// Dereference this to get to the location.
__ mov(eax, Operand(eax, 0));
}
- // Check if the result handle holds 0
+ // Check if the result handle holds 0.
__ test(eax, Operand(eax));
- __ j(not_zero, &get_result, taken);
- // It was zero; the result is undefined.
- __ mov(eax, Factory::undefined_value());
- __ jmp(&prologue);
+ __ j(zero, &empty_handle, not_taken);
// It was non-zero. Dereference to get the result value.
- __ bind(&get_result);
__ mov(eax, Operand(eax, 0));
__ bind(&prologue);
__ LeaveExitFrame(ExitFrame::MODE_NORMAL);
__ ret(0);
__ bind(&promote_scheduled_exception);
__ TailCallRuntime(Runtime::kPromoteScheduledException, 0, 1);
+ __ bind(&empty_handle);
+ // It was zero; the result is undefined.
+ __ mov(eax, Factory::undefined_value());
+ __ jmp(&prologue);
}
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698