Reviewers: Weiliang, Toon Verwaest,

Message:
hello, Weiliang.
please review this porting patch.
thanks.

Description:
X87: Clean up the global object naming madness.

port r22117

original message:

  Clean up the global object naming madness.

BUG=

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

SVN Base: https://github.com/v8/v8.git@master

Affected files (+16, -16 lines):
  M src/x87/builtins-x87.cc
  M src/x87/full-codegen-x87.cc
  M src/x87/lithium-codegen-x87.cc
  M src/x87/stub-cache-x87.cc


Index: src/x87/builtins-x87.cc
diff --git a/src/x87/builtins-x87.cc b/src/x87/builtins-x87.cc
index bc396412df4e2b327f530f996b9ec58fc83f3f75..a795a18c4475c6672fc6ab3d02c562ae17d3a1e2 100644
--- a/src/x87/builtins-x87.cc
+++ b/src/x87/builtins-x87.cc
@@ -765,7 +765,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
   // 3a. Patch the first argument if necessary when calling a function.
   Label shift_arguments;
   __ Move(edx, Immediate(0));  // indicate regular JS_FUNCTION
-  { Label convert_to_object, use_global_receiver, patch_receiver;
+  { Label convert_to_object, use_global_proxy, patch_receiver;
     // Change context eagerly in case we need the global receiver.
     __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));

@@ -787,9 +787,9 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
     // global object if it is null or undefined.
     __ JumpIfSmi(ebx, &convert_to_object);
     __ cmp(ebx, factory->null_value());
-    __ j(equal, &use_global_receiver);
+    __ j(equal, &use_global_proxy);
     __ cmp(ebx, factory->undefined_value());
-    __ j(equal, &use_global_receiver);
+    __ j(equal, &use_global_proxy);
     STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE);
     __ CmpObjectType(ebx, FIRST_SPEC_OBJECT_TYPE, ecx);
     __ j(above_equal, &shift_arguments);
@@ -814,10 +814,10 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
     __ mov(edi, Operand(esp, eax, times_4, 1 * kPointerSize));
     __ jmp(&patch_receiver);

-    __ bind(&use_global_receiver);
+    __ bind(&use_global_proxy);
     __ mov(ebx,
Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
-    __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset));
+    __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalProxyOffset));

     __ bind(&patch_receiver);
     __ mov(Operand(esp, eax, times_4, 0), ebx);
@@ -943,7 +943,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
     __ mov(ebx, Operand(ebp, kReceiverOffset));

// Check that the function is a JS function (otherwise it must be a proxy).
-    Label push_receiver, use_global_receiver;
+    Label push_receiver, use_global_proxy;
     __ mov(edi, Operand(ebp, kFunctionOffset));
     __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx);
     __ j(not_equal, &push_receiver);
@@ -971,9 +971,9 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
     // global object if it is null or undefined.
     __ JumpIfSmi(ebx, &call_to_object);
     __ cmp(ebx, factory->null_value());
-    __ j(equal, &use_global_receiver);
+    __ j(equal, &use_global_proxy);
     __ cmp(ebx, factory->undefined_value());
-    __ j(equal, &use_global_receiver);
+    __ j(equal, &use_global_proxy);
     STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE);
     __ CmpObjectType(ebx, FIRST_SPEC_OBJECT_TYPE, ecx);
     __ j(above_equal, &push_receiver);
@@ -984,10 +984,10 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
     __ mov(ebx, eax);
     __ jmp(&push_receiver);

-    __ bind(&use_global_receiver);
+    __ bind(&use_global_proxy);
     __ mov(ebx,
Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
-    __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset));
+    __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalProxyOffset));

     // Push the receiver.
     __ bind(&push_receiver);
Index: src/x87/full-codegen-x87.cc
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc
index 6f359fbd03fbb879588cd5f1739bfe05612d4e89..0a0d96ec1bd96aba79c9209b0f714c2c5e332ad8 100644
--- a/src/x87/full-codegen-x87.cc
+++ b/src/x87/full-codegen-x87.cc
@@ -123,7 +123,7 @@ void FullCodeGenerator::Generate() {
     __ j(not_equal, &ok, Label::kNear);

     __ mov(ecx, GlobalObjectOperand());
-    __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalReceiverOffset));
+    __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset));

     __ mov(Operand(esp, receiver_offset), ecx);

Index: src/x87/lithium-codegen-x87.cc
diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc
index 9eca40e49f74f14612ecc93f2c7897ec078d825b..72249892406ba8de0bd2d8048f3229cb282a1b09 100644
--- a/src/x87/lithium-codegen-x87.cc
+++ b/src/x87/lithium-codegen-x87.cc
@@ -120,7 +120,7 @@ bool LCodeGen::GeneratePrologue() {
       __ j(not_equal, &ok, Label::kNear);

       __ mov(ecx, GlobalObjectOperand());
-      __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalReceiverOffset));
+      __ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalProxyOffset));

       __ mov(Operand(esp, receiver_offset), ecx);

@@ -3439,8 +3439,8 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
   __ mov(receiver, FieldOperand(function, JSFunction::kContextOffset));
const int global_offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX);
   __ mov(receiver, Operand(receiver, global_offset));
-  const int receiver_offset = GlobalObject::kGlobalReceiverOffset;
-  __ mov(receiver, FieldOperand(receiver, receiver_offset));
+  const int proxy_offset = GlobalObject::kGlobalProxyOffset;
+  __ mov(receiver, FieldOperand(receiver, proxy_offset));
   __ bind(&receiver_ok);
 }

Index: src/x87/stub-cache-x87.cc
diff --git a/src/x87/stub-cache-x87.cc b/src/x87/stub-cache-x87.cc
index faab67a8c4c5c9dd145cfaed6d272b065f533ef4..fbd8a2b2ed7538717abc283e226564e7acaefd60 100644
--- a/src/x87/stub-cache-x87.cc
+++ b/src/x87/stub-cache-x87.cc
@@ -1176,7 +1176,7 @@ void StoreStubCompiler::GenerateStoreViaSetter(
       if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) {
         // Swap in the global receiver.
         __ mov(receiver,
- FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset));
+               FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset));
       }
       __ push(receiver);
       __ push(value());
@@ -1333,7 +1333,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
       if (IC::TypeToMap(*type, masm->isolate())->IsJSGlobalObjectMap()) {
         // Swap in the global receiver.
         __ mov(receiver,
- FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset));
+               FieldOperand(receiver, JSGlobalObject::kGlobalProxyOffset));
       }
       __ push(receiver);
       ParameterCount actual(0);


--
--
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.

Reply via email to