| OLD | NEW |
| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 stream->Add("InstanceofStub%s%s%s", | 243 stream->Add("InstanceofStub%s%s%s", |
| 244 args, | 244 args, |
| 245 inline_check, | 245 inline_check, |
| 246 return_true_false_object); | 246 return_true_false_object); |
| 247 } | 247 } |
| 248 | 248 |
| 249 | 249 |
| 250 void KeyedLoadElementStub::Generate(MacroAssembler* masm) { | 250 void KeyedLoadElementStub::Generate(MacroAssembler* masm) { |
| 251 switch (elements_kind_) { | 251 switch (elements_kind_) { |
| 252 case FAST_ELEMENTS: | 252 case FAST_ELEMENTS: |
| 253 case FAST_SMI_ONLY_ELEMENTS: |
| 253 KeyedLoadStubCompiler::GenerateLoadFastElement(masm); | 254 KeyedLoadStubCompiler::GenerateLoadFastElement(masm); |
| 254 break; | 255 break; |
| 255 case FAST_DOUBLE_ELEMENTS: | 256 case FAST_DOUBLE_ELEMENTS: |
| 256 KeyedLoadStubCompiler::GenerateLoadFastDoubleElement(masm); | 257 KeyedLoadStubCompiler::GenerateLoadFastDoubleElement(masm); |
| 257 break; | 258 break; |
| 258 case EXTERNAL_BYTE_ELEMENTS: | 259 case EXTERNAL_BYTE_ELEMENTS: |
| 259 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 260 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 260 case EXTERNAL_SHORT_ELEMENTS: | 261 case EXTERNAL_SHORT_ELEMENTS: |
| 261 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 262 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
| 262 case EXTERNAL_INT_ELEMENTS: | 263 case EXTERNAL_INT_ELEMENTS: |
| 263 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 264 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
| 264 case EXTERNAL_FLOAT_ELEMENTS: | 265 case EXTERNAL_FLOAT_ELEMENTS: |
| 265 case EXTERNAL_DOUBLE_ELEMENTS: | 266 case EXTERNAL_DOUBLE_ELEMENTS: |
| 266 case EXTERNAL_PIXEL_ELEMENTS: | 267 case EXTERNAL_PIXEL_ELEMENTS: |
| 267 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); | 268 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); |
| 268 break; | 269 break; |
| 269 case DICTIONARY_ELEMENTS: | 270 case DICTIONARY_ELEMENTS: |
| 270 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); | 271 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); |
| 271 break; | 272 break; |
| 272 case NON_STRICT_ARGUMENTS_ELEMENTS: | 273 case NON_STRICT_ARGUMENTS_ELEMENTS: |
| 273 UNREACHABLE(); | 274 UNREACHABLE(); |
| 274 break; | 275 break; |
| 275 } | 276 } |
| 276 } | 277 } |
| 277 | 278 |
| 278 | 279 |
| 279 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { | 280 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { |
| 280 switch (elements_kind_) { | 281 switch (elements_kind_) { |
| 281 case FAST_ELEMENTS: | 282 case FAST_ELEMENTS: |
| 282 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, is_js_array_); | 283 case FAST_SMI_ONLY_ELEMENTS: { |
| 284 KeyedStoreStubCompiler::StoreObjectAction store_object_action = |
| 285 elements_kind_ == FAST_SMI_ONLY_ELEMENTS |
| 286 ? KeyedStoreStubCompiler::kObjectStoreForcesGeneric |
| 287 : KeyedStoreStubCompiler::kObjectStoreCausesWriteBarrier; |
| 288 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, |
| 289 is_js_array_, |
| 290 store_object_action); |
| 291 } |
| 283 break; | 292 break; |
| 284 case FAST_DOUBLE_ELEMENTS: | 293 case FAST_DOUBLE_ELEMENTS: |
| 285 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, | 294 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, |
| 286 is_js_array_); | 295 is_js_array_); |
| 287 break; | 296 break; |
| 288 case EXTERNAL_BYTE_ELEMENTS: | 297 case EXTERNAL_BYTE_ELEMENTS: |
| 289 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 298 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 290 case EXTERNAL_SHORT_ELEMENTS: | 299 case EXTERNAL_SHORT_ELEMENTS: |
| 291 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 300 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
| 292 case EXTERNAL_INT_ELEMENTS: | 301 case EXTERNAL_INT_ELEMENTS: |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 } | 410 } |
| 402 | 411 |
| 403 | 412 |
| 404 bool ToBooleanStub::Types::CanBeUndetectable() const { | 413 bool ToBooleanStub::Types::CanBeUndetectable() const { |
| 405 return Contains(ToBooleanStub::SPEC_OBJECT) | 414 return Contains(ToBooleanStub::SPEC_OBJECT) |
| 406 || Contains(ToBooleanStub::STRING); | 415 || Contains(ToBooleanStub::STRING); |
| 407 } | 416 } |
| 408 | 417 |
| 409 | 418 |
| 410 } } // namespace v8::internal | 419 } } // namespace v8::internal |
| OLD | NEW |