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

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

Issue 6909026: Additional minor cleanup regarding CallWrapper: Use the null object pattern. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/arm/macro-assembler-arm.h ('k') | src/assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/macro-assembler-arm.cc
===================================================================
--- src/arm/macro-assembler-arm.cc (revision 7766)
+++ src/arm/macro-assembler-arm.cc (working copy)
@@ -886,7 +886,7 @@
Register code_reg,
Label* done,
InvokeFlag flag,
- CallWrapper* call_wrapper) {
+ const CallWrapper& call_wrapper) {
bool definitely_matches = false;
Label regular_invoke;
@@ -941,11 +941,9 @@
Handle<Code> adaptor =
isolate()->builtins()->ArgumentsAdaptorTrampoline();
if (flag == CALL_FUNCTION) {
- if (call_wrapper != NULL) {
- call_wrapper->BeforeCall(CallSize(adaptor, RelocInfo::CODE_TARGET));
- }
+ call_wrapper.BeforeCall(CallSize(adaptor, RelocInfo::CODE_TARGET));
Call(adaptor, RelocInfo::CODE_TARGET);
- if (call_wrapper != NULL) call_wrapper->AfterCall();
+ call_wrapper.AfterCall();
b(done);
} else {
Jump(adaptor, RelocInfo::CODE_TARGET);
@@ -959,15 +957,15 @@
const ParameterCount& expected,
const ParameterCount& actual,
InvokeFlag flag,
- CallWrapper* call_wrapper) {
+ const CallWrapper& call_wrapper) {
Label done;
InvokePrologue(expected, actual, Handle<Code>::null(), code, &done, flag,
call_wrapper);
if (flag == CALL_FUNCTION) {
- if (call_wrapper != NULL) call_wrapper->BeforeCall(CallSize(code));
+ call_wrapper.BeforeCall(CallSize(code));
Call(code);
- if (call_wrapper != NULL) call_wrapper->AfterCall();
+ call_wrapper.AfterCall();
} else {
ASSERT(flag == JUMP_FUNCTION);
Jump(code);
@@ -1002,7 +1000,7 @@
void MacroAssembler::InvokeFunction(Register fun,
const ParameterCount& actual,
InvokeFlag flag,
- CallWrapper* call_wrapper) {
+ const CallWrapper& call_wrapper) {
// Contract with called JS functions requires that function is passed in r1.
ASSERT(fun.is(r1));
@@ -2314,12 +2312,12 @@
void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
InvokeFlag flag,
- CallWrapper* call_wrapper) {
+ const CallWrapper& call_wrapper) {
GetBuiltinEntry(r2, id);
if (flag == CALL_FUNCTION) {
- if (call_wrapper != NULL) call_wrapper->BeforeCall(CallSize(r2));
+ call_wrapper.BeforeCall(CallSize(r2));
Call(r2);
- if (call_wrapper != NULL) call_wrapper->AfterCall();
+ call_wrapper.AfterCall();
} else {
ASSERT(flag == JUMP_FUNCTION);
Jump(r2);
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698