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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 239 |
240 stream->Add("InstanceofStub%s%s%s", | 240 stream->Add("InstanceofStub%s%s%s", |
241 args, | 241 args, |
242 inline_check, | 242 inline_check, |
243 return_true_false_object); | 243 return_true_false_object); |
244 } | 244 } |
245 | 245 |
246 | 246 |
247 void KeyedLoadElementStub::Generate(MacroAssembler* masm) { | 247 void KeyedLoadElementStub::Generate(MacroAssembler* masm) { |
248 switch (elements_kind_) { | 248 switch (elements_kind_) { |
249 case JSObject::FAST_ELEMENTS: | 249 case FAST_ELEMENTS: |
250 KeyedLoadStubCompiler::GenerateLoadFastElement(masm); | 250 KeyedLoadStubCompiler::GenerateLoadFastElement(masm); |
251 break; | 251 break; |
252 case JSObject::FAST_DOUBLE_ELEMENTS: | 252 case FAST_DOUBLE_ELEMENTS: |
253 KeyedLoadStubCompiler::GenerateLoadFastDoubleElement(masm); | 253 KeyedLoadStubCompiler::GenerateLoadFastDoubleElement(masm); |
254 break; | 254 break; |
255 case JSObject::EXTERNAL_BYTE_ELEMENTS: | 255 case EXTERNAL_BYTE_ELEMENTS: |
256 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 256 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
257 case JSObject::EXTERNAL_SHORT_ELEMENTS: | 257 case EXTERNAL_SHORT_ELEMENTS: |
258 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 258 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
259 case JSObject::EXTERNAL_INT_ELEMENTS: | 259 case EXTERNAL_INT_ELEMENTS: |
260 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | 260 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
261 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | 261 case EXTERNAL_FLOAT_ELEMENTS: |
262 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | 262 case EXTERNAL_DOUBLE_ELEMENTS: |
263 case JSObject::EXTERNAL_PIXEL_ELEMENTS: | 263 case EXTERNAL_PIXEL_ELEMENTS: |
264 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); | 264 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, elements_kind_); |
265 break; | 265 break; |
266 case JSObject::DICTIONARY_ELEMENTS: | 266 case DICTIONARY_ELEMENTS: |
267 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); | 267 KeyedLoadStubCompiler::GenerateLoadDictionaryElement(masm); |
268 break; | 268 break; |
269 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: | 269 case NON_STRICT_ARGUMENTS_ELEMENTS: |
270 UNREACHABLE(); | 270 UNREACHABLE(); |
271 break; | 271 break; |
272 } | 272 } |
273 } | 273 } |
274 | 274 |
275 | 275 |
276 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { | 276 void KeyedStoreElementStub::Generate(MacroAssembler* masm) { |
277 switch (elements_kind_) { | 277 switch (elements_kind_) { |
278 case JSObject::FAST_ELEMENTS: | 278 case FAST_ELEMENTS: |
279 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, is_js_array_); | 279 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, is_js_array_); |
280 break; | 280 break; |
281 case JSObject::FAST_DOUBLE_ELEMENTS: | 281 case FAST_DOUBLE_ELEMENTS: |
282 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, | 282 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, |
283 is_js_array_); | 283 is_js_array_); |
284 break; | 284 break; |
285 case JSObject::EXTERNAL_BYTE_ELEMENTS: | 285 case EXTERNAL_BYTE_ELEMENTS: |
286 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 286 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
287 case JSObject::EXTERNAL_SHORT_ELEMENTS: | 287 case EXTERNAL_SHORT_ELEMENTS: |
288 case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 288 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
289 case JSObject::EXTERNAL_INT_ELEMENTS: | 289 case EXTERNAL_INT_ELEMENTS: |
290 case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: | 290 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
291 case JSObject::EXTERNAL_FLOAT_ELEMENTS: | 291 case EXTERNAL_FLOAT_ELEMENTS: |
292 case JSObject::EXTERNAL_DOUBLE_ELEMENTS: | 292 case EXTERNAL_DOUBLE_ELEMENTS: |
293 case JSObject::EXTERNAL_PIXEL_ELEMENTS: | 293 case EXTERNAL_PIXEL_ELEMENTS: |
294 KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, elements_kind_); | 294 KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, elements_kind_); |
295 break; | 295 break; |
296 case JSObject::DICTIONARY_ELEMENTS: | 296 case DICTIONARY_ELEMENTS: |
297 KeyedStoreStubCompiler::GenerateStoreDictionaryElement(masm); | 297 KeyedStoreStubCompiler::GenerateStoreDictionaryElement(masm); |
298 break; | 298 break; |
299 case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: | 299 case NON_STRICT_ARGUMENTS_ELEMENTS: |
300 UNREACHABLE(); | 300 UNREACHABLE(); |
301 break; | 301 break; |
302 } | 302 } |
303 } | 303 } |
304 | 304 |
305 | 305 |
306 void ArgumentsAccessStub::PrintName(StringStream* stream) { | 306 void ArgumentsAccessStub::PrintName(StringStream* stream) { |
307 const char* type_name = NULL; // Make g++ happy. | 307 const char* type_name = NULL; // Make g++ happy. |
308 switch (type_) { | 308 switch (type_) { |
309 case READ_ELEMENT: type_name = "ReadElement"; break; | 309 case READ_ELEMENT: type_name = "ReadElement"; break; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 } | 403 } |
404 | 404 |
405 | 405 |
406 bool ToBooleanStub::Types::CanBeUndetectable() const { | 406 bool ToBooleanStub::Types::CanBeUndetectable() const { |
407 return Contains(ToBooleanStub::SPEC_OBJECT) | 407 return Contains(ToBooleanStub::SPEC_OBJECT) |
408 || Contains(ToBooleanStub::STRING); | 408 || Contains(ToBooleanStub::STRING); |
409 } | 409 } |
410 | 410 |
411 | 411 |
412 } } // namespace v8::internal | 412 } } // namespace v8::internal |
OLD | NEW |