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

Side by Side Diff: src/ic/arm/handler-compiler-arm.cc

Issue 873723005: Load API holder from prototype chain instead embedding it in handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More fixes Created 5 years, 10 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
« no previous file with comments | « no previous file | src/ic/arm64/handler-compiler-arm64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 Register data = r4; 259 Register data = r4;
260 Register holder = r2; 260 Register holder = r2;
261 Register api_function_address = r1; 261 Register api_function_address = r1;
262 262
263 // Put callee in place. 263 // Put callee in place.
264 __ LoadAccessor(callee, accessor_holder, accessor_index, 264 __ LoadAccessor(callee, accessor_holder, accessor_index,
265 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER); 265 is_store ? ACCESSOR_SETTER : ACCESSOR_GETTER);
266 266
267 // Put holder in place. 267 // Put holder in place.
268 CallOptimization::HolderLookup holder_lookup; 268 CallOptimization::HolderLookup holder_lookup;
269 Handle<JSObject> api_holder = 269 int holder_depth = 0;
270 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); 270 optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup,
271 &holder_depth);
271 switch (holder_lookup) { 272 switch (holder_lookup) {
272 case CallOptimization::kHolderIsReceiver: 273 case CallOptimization::kHolderIsReceiver:
273 __ Move(holder, receiver); 274 __ Move(holder, receiver);
274 break; 275 break;
275 case CallOptimization::kHolderFound: 276 case CallOptimization::kHolderFound:
276 __ Move(holder, api_holder); 277 __ ldr(holder, FieldMemOperand(receiver, HeapObject::kMapOffset));
278 __ ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset));
279 for (int i = 1; i < holder_depth; i++) {
280 __ ldr(holder, FieldMemOperand(holder, HeapObject::kMapOffset));
281 __ ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset));
282 }
277 break; 283 break;
278 case CallOptimization::kHolderNotFound: 284 case CallOptimization::kHolderNotFound:
279 UNREACHABLE(); 285 UNREACHABLE();
280 break; 286 break;
281 } 287 }
282 288
283 Isolate* isolate = masm->isolate(); 289 Isolate* isolate = masm->isolate();
284 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); 290 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info();
285 bool call_data_undefined = false; 291 bool call_data_undefined = false;
286 // Put call data in place. 292 // Put call data in place.
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 // Return the generated code. 747 // Return the generated code.
742 return GetCode(kind(), Code::NORMAL, name); 748 return GetCode(kind(), Code::NORMAL, name);
743 } 749 }
744 750
745 751
746 #undef __ 752 #undef __
747 } 753 }
748 } // namespace v8::internal 754 } // namespace v8::internal
749 755
750 #endif // V8_TARGET_ARCH_ARM 756 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ic/arm64/handler-compiler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698