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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 6713074: Require an isolate parameter for most external reference creation to (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Further cleanup Created 9 years, 9 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 | « src/arm/deoptimizer-arm.cc ('k') | src/arm/ic-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 __ CallRuntime(Runtime::kNumberAlloc, 0); 2804 __ CallRuntime(Runtime::kNumberAlloc, 0);
2805 __ mov(r4, Operand(r0)); 2805 __ mov(r4, Operand(r0));
2806 2806
2807 __ bind(&heapnumber_allocated); 2807 __ bind(&heapnumber_allocated);
2808 2808
2809 // Convert 32 random bits in r0 to 0.(32 random bits) in a double 2809 // Convert 32 random bits in r0 to 0.(32 random bits) in a double
2810 // by computing: 2810 // by computing:
2811 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)). 2811 // ( 1.(20 0s)(32 random bits) x 2^20 ) - (1.0 x 2^20)).
2812 if (isolate()->cpu_features()->IsSupported(VFP3)) { 2812 if (isolate()->cpu_features()->IsSupported(VFP3)) {
2813 __ PrepareCallCFunction(0, r1); 2813 __ PrepareCallCFunction(0, r1);
2814 __ CallCFunction(ExternalReference::random_uint32_function(), 0); 2814 __ CallCFunction(ExternalReference::random_uint32_function(isolate()), 0);
2815 2815
2816 CpuFeatures::Scope scope(VFP3); 2816 CpuFeatures::Scope scope(VFP3);
2817 // 0x41300000 is the top half of 1.0 x 2^20 as a double. 2817 // 0x41300000 is the top half of 1.0 x 2^20 as a double.
2818 // Create this constant using mov/orr to avoid PC relative load. 2818 // Create this constant using mov/orr to avoid PC relative load.
2819 __ mov(r1, Operand(0x41000000)); 2819 __ mov(r1, Operand(0x41000000));
2820 __ orr(r1, r1, Operand(0x300000)); 2820 __ orr(r1, r1, Operand(0x300000));
2821 // Move 0x41300000xxxxxxxx (x = random bits) to VFP. 2821 // Move 0x41300000xxxxxxxx (x = random bits) to VFP.
2822 __ vmov(d7, r0, r1); 2822 __ vmov(d7, r0, r1);
2823 // Move 0x4130000000000000 to VFP. 2823 // Move 0x4130000000000000 to VFP.
2824 __ mov(r0, Operand(0, RelocInfo::NONE)); 2824 __ mov(r0, Operand(0, RelocInfo::NONE));
2825 __ vmov(d8, r0, r1); 2825 __ vmov(d8, r0, r1);
2826 // Subtract and store the result in the heap number. 2826 // Subtract and store the result in the heap number.
2827 __ vsub(d7, d7, d8); 2827 __ vsub(d7, d7, d8);
2828 __ sub(r0, r4, Operand(kHeapObjectTag)); 2828 __ sub(r0, r4, Operand(kHeapObjectTag));
2829 __ vstr(d7, r0, HeapNumber::kValueOffset); 2829 __ vstr(d7, r0, HeapNumber::kValueOffset);
2830 __ mov(r0, r4); 2830 __ mov(r0, r4);
2831 } else { 2831 } else {
2832 __ mov(r0, Operand(r4)); 2832 __ mov(r0, Operand(r4));
2833 __ PrepareCallCFunction(1, r1); 2833 __ PrepareCallCFunction(1, r1);
2834 __ CallCFunction( 2834 __ CallCFunction(
2835 ExternalReference::fill_heap_number_with_random_function(), 1); 2835 ExternalReference::fill_heap_number_with_random_function(isolate()), 1);
2836 } 2836 }
2837 2837
2838 context()->Plug(r0); 2838 context()->Plug(r0);
2839 } 2839 }
2840 2840
2841 2841
2842 void FullCodeGenerator::EmitSubString(ZoneList<Expression*>* args) { 2842 void FullCodeGenerator::EmitSubString(ZoneList<Expression*>* args) {
2843 // Load the arguments on the stack and call the stub. 2843 // Load the arguments on the stack and call the stub.
2844 SubStringStub stub; 2844 SubStringStub stub;
2845 ASSERT(args->length() == 3); 2845 ASSERT(args->length() == 3);
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
4312 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4312 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4313 __ add(pc, r1, Operand(masm_->CodeObject())); 4313 __ add(pc, r1, Operand(masm_->CodeObject()));
4314 } 4314 }
4315 4315
4316 4316
4317 #undef __ 4317 #undef __
4318 4318
4319 } } // namespace v8::internal 4319 } } // namespace v8::internal
4320 4320
4321 #endif // V8_TARGET_ARCH_ARM 4321 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/deoptimizer-arm.cc ('k') | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698