Reviewers: danno, Erik Corry Chromium.org, paul.l..., dusmil.imgtec,
akos.palfi.imgtec, gergely.kis.imgtec,
Description:
MIPS: ARM: Load undefined receiver sentinel without constant pool.
Port a820568b1ffbf76c3f80b9e00fc0b988b073dfaf
Each call to emit_32 uses 5 constant pool slots:
* the "emit_32" string
* undefined (the receiver)
* the argument (heap number)
* the load IC
* the call IC
This change cuts that down 20% to 4, by loading the undefined from the heap
roots.
BUG=
Please review this at https://codereview.chromium.org/963193005/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+10, -4 lines):
M src/mips/builtins-mips.cc
M src/mips/full-codegen-mips.cc
M src/mips64/builtins-mips64.cc
M src/mips64/full-codegen-mips64.cc
Index: src/mips/builtins-mips.cc
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
index
42a0bbe58bc12a2689f49586a577e2046b1a2ee1..f8c112605c96f4e0bc1f0685e9e59ecabc57a5cc
100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -941,7 +941,9 @@ static void CallCompileOptimized(MacroAssembler* masm,
bool concurrent) {
// Push function as parameter to the runtime call.
__ Push(a1, a1);
// Whether to compile in a background thread.
- __ Push(masm->isolate()->factory()->ToBoolean(concurrent));
+ __ LoadRoot(
+ at, concurrent ? Heap::kTrueValueRootIndex :
Heap::kFalseValueRootIndex);
+ __ push(at);
__ CallRuntime(Runtime::kCompileOptimized, 2);
// Restore receiver.
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
69ab5e4d600afeed2c0d2807e7422d6b949e1eb7..153d9cf199546491f3f6cc23e44f0e80684b90da
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -2895,7 +2895,8 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call*
expr) {
}
// Push undefined as receiver. This is patched in the method prologue
if it
// is a sloppy mode method.
- __ Push(isolate()->factory()->undefined_value());
+ __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
+ __ push(at);
} else {
// Load the function from the receiver.
DCHECK(callee->IsProperty());
Index: src/mips64/builtins-mips64.cc
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc
index
89fda10b0596e28bbac4ff7cd40e8df50f1c26d7..53246335b7b73feb3f9863738ddce5235555105d
100644
--- a/src/mips64/builtins-mips64.cc
+++ b/src/mips64/builtins-mips64.cc
@@ -950,7 +950,9 @@ static void CallCompileOptimized(MacroAssembler* masm,
bool concurrent) {
// Push function as parameter to the runtime call.
__ Push(a1, a1);
// Whether to compile in a background thread.
- __ Push(masm->isolate()->factory()->ToBoolean(concurrent));
+ __ LoadRoot(
+ at, concurrent ? Heap::kTrueValueRootIndex :
Heap::kFalseValueRootIndex);
+ __ push(at);
__ CallRuntime(Runtime::kCompileOptimized, 2);
// Restore receiver.
Index: src/mips64/full-codegen-mips64.cc
diff --git a/src/mips64/full-codegen-mips64.cc
b/src/mips64/full-codegen-mips64.cc
index
5082a066dbe923bde2ea315c1bb5544fa7b9e929..1eadb77db6ed5258b679e3e62e877ee7fec0e57d
100644
--- a/src/mips64/full-codegen-mips64.cc
+++ b/src/mips64/full-codegen-mips64.cc
@@ -2896,7 +2896,8 @@ void FullCodeGenerator::EmitCallWithLoadIC(Call*
expr) {
}
// Push undefined as receiver. This is patched in the method prologue
if it
// is a sloppy mode method.
- __ Push(isolate()->factory()->undefined_value());
+ __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
+ __ push(at);
} else {
// Load the function from the receiver.
DCHECK(callee->IsProperty());
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.