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

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

Issue 530343005: Clean up code stubs and ensure distinct major keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); 272 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset());
273 } 273 }
274 274
275 // Restore context register. 275 // Restore context register.
276 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 276 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
277 } 277 }
278 __ Ret(); 278 __ Ret();
279 } 279 }
280 280
281 281
282 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
283 MacroAssembler* masm) {
284 // The return address is in lr.
285 Label slow, miss;
286
287 Register result = x0;
288 Register key = LoadDescriptor::NameRegister();
289 Register receiver = LoadDescriptor::ReceiverRegister();
290 DCHECK(receiver.is(x1));
291 DCHECK(key.is(x2));
292
293 __ JumpIfNotSmi(key, &miss);
294 __ Ldr(x4, FieldMemOperand(receiver, JSObject::kElementsOffset));
295 __ LoadFromNumberDictionary(&slow, x4, key, result, x7, x3, x5, x6);
296 __ Ret();
297
298 __ Bind(&slow);
299 __ IncrementCounter(
300 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, x4, x3);
301 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
302
303 // Miss case, call the runtime.
304 __ Bind(&miss);
305 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
306 }
307
308
309 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 282 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
310 // Push receiver, name and value for runtime call. 283 // Push receiver, name and value for runtime call.
311 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 284 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
312 StoreDescriptor::ValueRegister()); 285 StoreDescriptor::ValueRegister());
313 286
314 // The slow case calls into the runtime to complete the store without causing 287 // The slow case calls into the runtime to complete the store without causing
315 // an IC miss that would otherwise cause a transition to the generic stub. 288 // an IC miss that would otherwise cause a transition to the generic stub.
316 ExternalReference ref = 289 ExternalReference ref =
317 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); 290 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
318 __ TailCallExternalReference(ref, 3, 1); 291 __ TailCallExternalReference(ref, 3, 1);
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 // Return the generated code. 838 // Return the generated code.
866 return GetCode(kind(), Code::FAST, name); 839 return GetCode(kind(), Code::FAST, name);
867 } 840 }
868 841
869 842
870 #undef __ 843 #undef __
871 } 844 }
872 } // namespace v8::internal 845 } // namespace v8::internal
873 846
874 #endif // V8_TARGET_ARCH_IA32 847 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698