OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 381 matching lines...) Loading... | |
392 Add<HConstant>(JS_FUNCTION_PROXY_TYPE); | 392 Add<HConstant>(JS_FUNCTION_PROXY_TYPE); |
393 is_function.If<HCompareNumericAndBranch>(instance_type, js_function, | 393 is_function.If<HCompareNumericAndBranch>(instance_type, js_function, |
394 Token::EQ); | 394 Token::EQ); |
395 is_function.OrIf<HCompareNumericAndBranch>( | 395 is_function.OrIf<HCompareNumericAndBranch>( |
396 instance_type, js_function_proxy, Token::EQ); | 396 instance_type, js_function_proxy, Token::EQ); |
397 is_function.Then(); | 397 is_function.Then(); |
398 { Push(Add<HConstant>(factory->function_string())); } | 398 { Push(Add<HConstant>(factory->function_string())); } |
399 is_function.Else(); | 399 is_function.Else(); |
400 { | 400 { |
401 IfBuilder is_float32x4(this); | 401 IfBuilder is_float32x4(this); |
402 is_float32x4.If<HCompareNumericAndBranch>( | 402 is_float32x4.If<HCompareObjectEqAndBranch>( |
Yang
2015/08/11 09:08:45
Can we do an instance type check first to skip for
Benedikt Meurer
2015/08/11 09:11:45
As discussed offline: There's no runtime fallback
| |
403 instance_type, Add<HConstant>(FLOAT32X4_TYPE), Token::EQ); | 403 map, Add<HConstant>(factory->float32x4_map())); |
404 is_float32x4.Then(); | 404 is_float32x4.Then(); |
405 { Push(Add<HConstant>(factory->float32x4_string())); } | 405 { Push(Add<HConstant>(factory->float32x4_string())); } |
406 is_float32x4.Else(); | 406 is_float32x4.Else(); |
407 { | 407 { |
408 IfBuilder is_int32x4(this); | 408 IfBuilder is_int32x4(this); |
409 is_int32x4.If<HCompareNumericAndBranch>( | 409 is_int32x4.If<HCompareObjectEqAndBranch>( |
410 instance_type, Add<HConstant>(INT32X4_TYPE), Token::EQ); | 410 map, Add<HConstant>(factory->int32x4_map())); |
411 is_int32x4.Then(); | 411 is_int32x4.Then(); |
412 { Push(Add<HConstant>(factory->int32x4_string())); } | 412 { Push(Add<HConstant>(factory->int32x4_string())); } |
413 is_int32x4.Else(); | 413 is_int32x4.Else(); |
414 { | 414 { |
415 IfBuilder is_bool32x4(this); | 415 IfBuilder is_bool32x4(this); |
416 is_bool32x4.If<HCompareNumericAndBranch>( | 416 is_bool32x4.If<HCompareObjectEqAndBranch>( |
417 instance_type, Add<HConstant>(BOOL32X4_TYPE), Token::EQ); | 417 map, Add<HConstant>(factory->bool32x4_map())); |
418 is_bool32x4.Then(); | 418 is_bool32x4.Then(); |
419 { Push(Add<HConstant>(factory->bool32x4_string())); } | 419 { Push(Add<HConstant>(factory->bool32x4_string())); } |
420 is_bool32x4.Else(); | 420 is_bool32x4.Else(); |
421 { | 421 { |
422 IfBuilder is_int16x8(this); | 422 IfBuilder is_int16x8(this); |
423 is_int16x8.If<HCompareNumericAndBranch>( | 423 is_int16x8.If<HCompareObjectEqAndBranch>( |
424 instance_type, Add<HConstant>(INT16X8_TYPE), Token::EQ); | 424 map, Add<HConstant>(factory->int16x8_map())); |
425 is_int16x8.Then(); | 425 is_int16x8.Then(); |
426 { Push(Add<HConstant>(factory->int16x8_string())); } | 426 { Push(Add<HConstant>(factory->int16x8_string())); } |
427 is_int16x8.Else(); | 427 is_int16x8.Else(); |
428 { | 428 { |
429 IfBuilder is_bool16x8(this); | 429 IfBuilder is_bool16x8(this); |
430 is_bool16x8.If<HCompareNumericAndBranch>( | 430 is_bool16x8.If<HCompareObjectEqAndBranch>( |
431 instance_type, Add<HConstant>(BOOL16X8_TYPE), | 431 map, Add<HConstant>(factory->bool16x8_map())); |
432 Token::EQ); | |
433 is_bool16x8.Then(); | 432 is_bool16x8.Then(); |
434 { Push(Add<HConstant>(factory->bool16x8_string())); } | 433 { Push(Add<HConstant>(factory->bool16x8_string())); } |
435 is_bool16x8.Else(); | 434 is_bool16x8.Else(); |
436 { | 435 { |
437 IfBuilder is_int8x16(this); | 436 IfBuilder is_int8x16(this); |
438 is_int8x16.If<HCompareNumericAndBranch>( | 437 is_int8x16.If<HCompareObjectEqAndBranch>( |
439 instance_type, Add<HConstant>(INT8X16_TYPE), | 438 map, Add<HConstant>(factory->int8x16_map())); |
440 Token::EQ); | |
441 is_int8x16.Then(); | 439 is_int8x16.Then(); |
442 { Push(Add<HConstant>(factory->int8x16_string())); } | 440 { Push(Add<HConstant>(factory->int8x16_string())); } |
443 is_int8x16.Else(); | 441 is_int8x16.Else(); |
444 { | 442 { |
445 IfBuilder is_bool8x16(this); | 443 IfBuilder is_bool8x16(this); |
446 is_bool8x16.If<HCompareNumericAndBranch>( | 444 is_bool8x16.If<HCompareObjectEqAndBranch>( |
447 instance_type, Add<HConstant>(BOOL8X16_TYPE), | 445 map, Add<HConstant>(factory->bool8x16_map())); |
448 Token::EQ); | |
449 is_bool8x16.Then(); | 446 is_bool8x16.Then(); |
450 { Push(Add<HConstant>(factory->bool8x16_string())); } | 447 { Push(Add<HConstant>(factory->bool8x16_string())); } |
451 is_bool8x16.Else(); | 448 is_bool8x16.Else(); |
452 { | 449 { |
453 // Is it an undetectable object? | 450 // Is it an undetectable object? |
454 IfBuilder is_undetectable(this); | 451 IfBuilder is_undetectable(this); |
455 is_undetectable.If<HIsUndetectableAndBranch>( | 452 is_undetectable.If<HIsUndetectableAndBranch>( |
456 object); | 453 object); |
457 is_undetectable.Then(); | 454 is_undetectable.Then(); |
458 { | 455 { |
(...skipping 1815 matching lines...) Loading... | |
2274 return Pop(); | 2271 return Pop(); |
2275 } | 2272 } |
2276 | 2273 |
2277 | 2274 |
2278 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2275 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2279 return DoGenerateCode(this); | 2276 return DoGenerateCode(this); |
2280 } | 2277 } |
2281 | 2278 |
2282 } // namespace internal | 2279 } // namespace internal |
2283 } // namespace v8 | 2280 } // namespace v8 |
OLD | NEW |