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

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

Issue 6656001: Support external arrays in Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version 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/lithium-arm.cc ('k') | src/hydrogen.h » ('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 2372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2)); 2383 __ add(scratch, elements, Operand(key, LSL, kPointerSizeLog2));
2384 __ ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize)); 2384 __ ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize));
2385 2385
2386 // Check for the hole value. 2386 // Check for the hole value.
2387 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 2387 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
2388 __ cmp(result, scratch); 2388 __ cmp(result, scratch);
2389 DeoptimizeIf(eq, instr->environment()); 2389 DeoptimizeIf(eq, instr->environment());
2390 } 2390 }
2391 2391
2392 2392
2393 void LCodeGen::DoLoadPixelArrayElement(LLoadPixelArrayElement* instr) { 2393 void LCodeGen::DoLoadKeyedSpecializedArrayElement(
2394 LLoadKeyedSpecializedArrayElement* instr) {
2395 ASSERT(instr->array_type() == kExternalPixelArray);
2396
2394 Register external_pointer = ToRegister(instr->external_pointer()); 2397 Register external_pointer = ToRegister(instr->external_pointer());
2395 Register key = ToRegister(instr->key()); 2398 Register key = ToRegister(instr->key());
2396 Register result = ToRegister(instr->result()); 2399 Register result = ToRegister(instr->result());
2397 2400
2398 // Load the result. 2401 // Load the result.
2399 __ ldrb(result, MemOperand(external_pointer, key)); 2402 __ ldrb(result, MemOperand(external_pointer, key));
2400 } 2403 }
2401 2404
2402 2405
2403 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 2406 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 } 3054 }
3052 3055
3053 if (instr->hydrogen()->NeedsWriteBarrier()) { 3056 if (instr->hydrogen()->NeedsWriteBarrier()) {
3054 // Compute address of modified element and store it into key register. 3057 // Compute address of modified element and store it into key register.
3055 __ add(key, scratch, Operand(FixedArray::kHeaderSize)); 3058 __ add(key, scratch, Operand(FixedArray::kHeaderSize));
3056 __ RecordWrite(elements, key, value); 3059 __ RecordWrite(elements, key, value);
3057 } 3060 }
3058 } 3061 }
3059 3062
3060 3063
3061 void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) { 3064 void LCodeGen::DoStoreKeyedSpecializedArrayElement(
3065 LStoreKeyedSpecializedArrayElement* instr) {
3066 ASSERT(instr->array_type() == kExternalPixelArray);
3067
3062 Register external_pointer = ToRegister(instr->external_pointer()); 3068 Register external_pointer = ToRegister(instr->external_pointer());
3063 Register key = ToRegister(instr->key()); 3069 Register key = ToRegister(instr->key());
3064 Register value = ToRegister(instr->value()); 3070 Register value = ToRegister(instr->value());
3065 3071
3066 // Clamp the value to [0..255]. 3072 // Clamp the value to [0..255].
3067 __ Usat(value, 8, Operand(value)); 3073 __ Usat(value, 8, Operand(value));
3068 __ strb(value, MemOperand(external_pointer, key, LSL, 0)); 3074 __ strb(value, MemOperand(external_pointer, key, LSL, 0));
3069 } 3075 }
3070 3076
3071 3077
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
4068 ASSERT(!environment->HasBeenRegistered()); 4074 ASSERT(!environment->HasBeenRegistered());
4069 RegisterEnvironmentForDeoptimization(environment); 4075 RegisterEnvironmentForDeoptimization(environment);
4070 ASSERT(osr_pc_offset_ == -1); 4076 ASSERT(osr_pc_offset_ == -1);
4071 osr_pc_offset_ = masm()->pc_offset(); 4077 osr_pc_offset_ = masm()->pc_offset();
4072 } 4078 }
4073 4079
4074 4080
4075 #undef __ 4081 #undef __
4076 4082
4077 } } // namespace v8::internal 4083 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698