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

Side by Side Diff: src/ic/arm/handler-compiler-arm.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_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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 279 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
280 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 280 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
281 __ mov(api_function_address, Operand(ref)); 281 __ mov(api_function_address, Operand(ref));
282 282
283 // Jump to stub. 283 // Jump to stub.
284 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); 284 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
285 __ TailCallStub(&stub); 285 __ TailCallStub(&stub);
286 } 286 }
287 287
288 288
289 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
290 MacroAssembler* masm) {
291 // The return address is in lr.
292 Label slow, miss;
293
294 Register key = LoadDescriptor::NameRegister();
295 Register receiver = LoadDescriptor::ReceiverRegister();
296 DCHECK(receiver.is(r1));
297 DCHECK(key.is(r2));
298
299 __ UntagAndJumpIfNotSmi(r6, key, &miss);
300 __ ldr(r4, FieldMemOperand(receiver, JSObject::kElementsOffset));
301 __ LoadFromNumberDictionary(&slow, r4, key, r0, r6, r3, r5);
302 __ Ret();
303
304 __ bind(&slow);
305 __ IncrementCounter(
306 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, r2, r3);
307
308 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
309
310 // Miss case, call the runtime.
311 __ bind(&miss);
312
313 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
314 }
315
316
317 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 289 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
318 // Push receiver, key and value for runtime call. 290 // Push receiver, key and value for runtime call.
319 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 291 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
320 StoreDescriptor::ValueRegister()); 292 StoreDescriptor::ValueRegister());
321 293
322 // The slow case calls into the runtime to complete the store without causing 294 // The slow case calls into the runtime to complete the store without causing
323 // an IC miss that would otherwise cause a transition to the generic stub. 295 // an IC miss that would otherwise cause a transition to the generic stub.
324 ExternalReference ref = 296 ExternalReference ref =
325 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); 297 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
326 __ TailCallExternalReference(ref, 3, 1); 298 __ TailCallExternalReference(ref, 3, 1);
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // Return the generated code. 831 // Return the generated code.
860 return GetCode(kind(), Code::NORMAL, name); 832 return GetCode(kind(), Code::NORMAL, name);
861 } 833 }
862 834
863 835
864 #undef __ 836 #undef __
865 } 837 }
866 } // namespace v8::internal 838 } // namespace v8::internal
867 839
868 #endif // V8_TARGET_ARCH_ARM 840 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698