OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 | 292 |
293 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { | 293 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { |
294 switch (elements_kind_) { | 294 switch (elements_kind_) { |
295 case FAST_ELEMENTS: | 295 case FAST_ELEMENTS: |
296 case FAST_SMI_ONLY_ELEMENTS: { | 296 case FAST_SMI_ONLY_ELEMENTS: { |
297 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, | 297 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, |
298 is_js_array_, | 298 is_js_array_, |
299 elements_kind_); | 299 elements_kind_, |
| 300 grow_mode_); |
300 } | 301 } |
301 break; | 302 break; |
302 case FAST_DOUBLE_ELEMENTS: | 303 case FAST_DOUBLE_ELEMENTS: |
303 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, | 304 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, |
304 is_js_array_); | 305 is_js_array_, |
| 306 grow_mode_); |
305 break; | 307 break; |
306 case EXTERNAL_BYTE_ELEMENTS: | 308 case EXTERNAL_BYTE_ELEMENTS: |
307 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 309 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
308 case EXTERNAL_SHORT_ELEMENTS: | 310 case EXTERNAL_SHORT_ELEMENTS: |
309 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 311 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
310 case EXTERNAL_INT_ELEMENTS: | 312 case EXTERNAL_INT_ELEMENTS: |
311 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 313 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
312 case EXTERNAL_FLOAT_ELEMENTS: | 314 case EXTERNAL_FLOAT_ELEMENTS: |
313 case EXTERNAL_DOUBLE_ELEMENTS: | 315 case EXTERNAL_DOUBLE_ELEMENTS: |
314 case EXTERNAL_PIXEL_ELEMENTS: | 316 case EXTERNAL_PIXEL_ELEMENTS: |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 if (to_ == FAST_ELEMENTS) { | 435 if (to_ == FAST_ELEMENTS) { |
434 if (from_ == FAST_SMI_ONLY_ELEMENTS) { | 436 if (from_ == FAST_SMI_ONLY_ELEMENTS) { |
435 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm); | 437 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm); |
436 } else if (from_ == FAST_DOUBLE_ELEMENTS) { | 438 } else if (from_ == FAST_DOUBLE_ELEMENTS) { |
437 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); | 439 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); |
438 } else { | 440 } else { |
439 UNREACHABLE(); | 441 UNREACHABLE(); |
440 } | 442 } |
441 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, | 443 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, |
442 is_jsarray_, | 444 is_jsarray_, |
443 FAST_ELEMENTS); | 445 FAST_ELEMENTS, |
| 446 grow_mode_); |
444 } else if (from_ == FAST_SMI_ONLY_ELEMENTS && to_ == FAST_DOUBLE_ELEMENTS) { | 447 } else if (from_ == FAST_SMI_ONLY_ELEMENTS && to_ == FAST_DOUBLE_ELEMENTS) { |
445 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); | 448 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); |
446 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, is_jsarray_); | 449 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, |
| 450 is_jsarray_, |
| 451 grow_mode_); |
447 } else { | 452 } else { |
448 UNREACHABLE(); | 453 UNREACHABLE(); |
449 } | 454 } |
450 } | 455 } |
451 masm->bind(&fail); | 456 masm->bind(&fail); |
452 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); | 457 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); |
453 } | 458 } |
454 | 459 |
455 } } // namespace v8::internal | 460 } } // namespace v8::internal |
OLD | NEW |