Reviewers: danno, Paul Lind, palfia, kisg,

Description:
MIPS: Deprecate FACTORY helper macro.

Port r14931 (a914442)

Original commit message:
This removes the FACTORY helper macro to avoid accidental TLS access
when using the factory. Most internal code has access to the Isolate by
now whereas tests which are not performance critical still heavily use
TLS access through explicit Isolate::Current() calls.

BUG=


Please review this at https://codereview.chromium.org/15994011/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/mips/code-stubs-mips.cc
  M src/mips/full-codegen-mips.cc
  M src/mips/regexp-macro-assembler-mips.cc


Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 552797adb224d70a3e36b79ec18269ef291811e0..87fe292cbbe66d41880b230f3f9f901179d44f4b 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -961,7 +961,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm,

   __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask));

-  // Test for NaN. Sadly, we can't just compare to factory->nan_value(),
+  // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
   // so we do the second best thing - test it ourselves.
   // They are both equal and they are not both Smis so both of them are not
   // Smis. If it's not a heap number, then return equal.
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index 78f44ab23eefa573b7983680ff3389c4768530df..fa85da680fcb5f2b4f555c1147a55c732b669d31 100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -3039,7 +3039,7 @@ void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf(
   // string "valueOf" the result is false.
// The use of t2 to store the valueOf string assumes that it is not otherwise
   // used in the loop below.
-  __ li(t2, Operand(FACTORY->value_of_string()));
+  __ li(t2, Operand(isolate()->factory()->value_of_string()));
   __ jmp(&entry);
   __ bind(&loop);
   __ lw(a3, MemOperand(t0, 0));
Index: src/mips/regexp-macro-assembler-mips.cc
diff --git a/src/mips/regexp-macro-assembler-mips.cc b/src/mips/regexp-macro-assembler-mips.cc index 7289296d56815e48c39107ddabd142b6ef316dcc..3e255b7d80d69751878298683997514e21a35433 100644
--- a/src/mips/regexp-macro-assembler-mips.cc
+++ b/src/mips/regexp-macro-assembler-mips.cc
@@ -929,9 +929,8 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {

   CodeDesc code_desc;
   masm_->GetCode(&code_desc);
-  Handle<Code> code = FACTORY->NewCode(code_desc,
-                                       Code::ComputeFlags(Code::REGEXP),
-                                       masm_->CodeObject());
+  Handle<Code> code = isolate()->factory()->NewCode(
+      code_desc, Code::ComputeFlags(Code::REGEXP), masm_->CodeObject());
   LOG(Isolate::Current(), RegExpCodeCreateEvent(*code, *source));
   return Handle<HeapObject>::cast(code);
 }


--
--
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/groups/opt_out.


Reply via email to