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

Side by Side Diff: src/arm/builtins-arm.cc

Issue 93863006: Revert "Load the global proxy from the context of the target function." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 16 matching lines...) Expand all
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #if V8_TARGET_ARCH_ARM 30 #if V8_TARGET_ARCH_ARM
31 31
32 #include "codegen.h" 32 #include "codegen.h"
33 #include "debug.h" 33 #include "debug.h"
34 #include "deoptimizer.h" 34 #include "deoptimizer.h"
35 #include "full-codegen.h" 35 #include "full-codegen.h"
36 #include "runtime.h" 36 #include "runtime.h"
37 #include "stub-cache.h"
38 37
39 namespace v8 { 38 namespace v8 {
40 namespace internal { 39 namespace internal {
41 40
42 41
43 #define __ ACCESS_MASM(masm) 42 #define __ ACCESS_MASM(masm)
44 43
45 44
46 void Builtins::Generate_Adaptor(MacroAssembler* masm, 45 void Builtins::Generate_Adaptor(MacroAssembler* masm,
47 CFunctionId id, 46 CFunctionId id,
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 } 1084 }
1086 1085
1087 // Restore the function to r1, and the flag to r4. 1086 // Restore the function to r1, and the flag to r4.
1088 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2)); 1087 __ ldr(r1, MemOperand(sp, r0, LSL, kPointerSizeLog2));
1089 __ mov(r4, Operand::Zero()); 1088 __ mov(r4, Operand::Zero());
1090 __ jmp(&patch_receiver); 1089 __ jmp(&patch_receiver);
1091 1090
1092 // Use the global receiver object from the called function as the 1091 // Use the global receiver object from the called function as the
1093 // receiver. 1092 // receiver.
1094 __ bind(&use_global_receiver); 1093 __ bind(&use_global_receiver);
1095 __ ldr(r2, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); 1094 const int kGlobalIndex =
1096 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset)); 1095 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
1096 __ ldr(r2, FieldMemOperand(cp, kGlobalIndex));
1097 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kNativeContextOffset));
1098 __ ldr(r2, FieldMemOperand(r2, kGlobalIndex));
1099 __ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalReceiverOffset));
1097 1100
1098 __ bind(&patch_receiver); 1101 __ bind(&patch_receiver);
1099 __ add(r3, sp, Operand(r0, LSL, kPointerSizeLog2)); 1102 __ add(r3, sp, Operand(r0, LSL, kPointerSizeLog2));
1100 __ str(r2, MemOperand(r3, -kPointerSize)); 1103 __ str(r2, MemOperand(r3, -kPointerSize));
1101 1104
1102 __ jmp(&shift_arguments); 1105 __ jmp(&shift_arguments);
1103 } 1106 }
1104 1107
1105 // 3b. Check for function proxy. 1108 // 3b. Check for function proxy.
1106 __ bind(&slow); 1109 __ bind(&slow);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 1280
1278 // Convert the receiver to a regular object. 1281 // Convert the receiver to a regular object.
1279 // r0: receiver 1282 // r0: receiver
1280 __ bind(&call_to_object); 1283 __ bind(&call_to_object);
1281 __ push(r0); 1284 __ push(r0);
1282 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); 1285 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
1283 __ b(&push_receiver); 1286 __ b(&push_receiver);
1284 1287
1285 // Use the current global receiver object as the receiver. 1288 // Use the current global receiver object as the receiver.
1286 __ bind(&use_global_receiver); 1289 __ bind(&use_global_receiver);
1287 __ ldr(r0, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); 1290 const int kGlobalOffset =
1291 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
1292 __ ldr(r0, FieldMemOperand(cp, kGlobalOffset));
1293 __ ldr(r0, FieldMemOperand(r0, GlobalObject::kNativeContextOffset));
1294 __ ldr(r0, FieldMemOperand(r0, kGlobalOffset));
1288 __ ldr(r0, FieldMemOperand(r0, GlobalObject::kGlobalReceiverOffset)); 1295 __ ldr(r0, FieldMemOperand(r0, GlobalObject::kGlobalReceiverOffset));
1289 1296
1290 // Push the receiver. 1297 // Push the receiver.
1291 // r0: receiver 1298 // r0: receiver
1292 __ bind(&push_receiver); 1299 __ bind(&push_receiver);
1293 __ push(r0); 1300 __ push(r0);
1294 1301
1295 // Copy all arguments from the array to the stack. 1302 // Copy all arguments from the array to the stack.
1296 Label entry, loop; 1303 Label entry, loop;
1297 __ ldr(r0, MemOperand(fp, kIndexOffset)); 1304 __ ldr(r0, MemOperand(fp, kIndexOffset));
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 __ bind(&dont_adapt_arguments); 1492 __ bind(&dont_adapt_arguments);
1486 __ Jump(r3); 1493 __ Jump(r3);
1487 } 1494 }
1488 1495
1489 1496
1490 #undef __ 1497 #undef __
1491 1498
1492 } } // namespace v8::internal 1499 } } // namespace v8::internal
1493 1500
1494 #endif // V8_TARGET_ARCH_ARM 1501 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698