Chromium Code Reviews| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 HConstant* js_function_proxy = | 373 HConstant* js_function_proxy = |
| 374 Add<HConstant>(JS_FUNCTION_PROXY_TYPE); | 374 Add<HConstant>(JS_FUNCTION_PROXY_TYPE); |
| 375 is_function.If<HCompareNumericAndBranch>(instance_type, js_function, | 375 is_function.If<HCompareNumericAndBranch>(instance_type, js_function, |
| 376 Token::EQ); | 376 Token::EQ); |
| 377 is_function.OrIf<HCompareNumericAndBranch>( | 377 is_function.OrIf<HCompareNumericAndBranch>( |
| 378 instance_type, js_function_proxy, Token::EQ); | 378 instance_type, js_function_proxy, Token::EQ); |
| 379 is_function.Then(); | 379 is_function.Then(); |
| 380 { Push(Add<HConstant>(factory->function_string())); } | 380 { Push(Add<HConstant>(factory->function_string())); } |
| 381 is_function.Else(); | 381 is_function.Else(); |
| 382 { | 382 { |
| 383 IfBuilder is_float32x4(this); | 383 #define SIMD128_BUILDER_OPEN(TYPE, Type, type, lane_count, lane_type) \ |
| 384 is_float32x4.If<HCompareObjectEqAndBranch>( | 384 IfBuilder is_##type(this); \ |
| 385 map, Add<HConstant>(factory->float32x4_map())); | 385 is_##type.If<HCompareObjectEqAndBranch>( \ |
| 386 is_float32x4.Then(); | 386 map, Add<HConstant>(factory->type##_map())); \ |
| 387 { Push(Add<HConstant>(factory->float32x4_string())); } | 387 is_##type.Then(); \ |
| 388 is_float32x4.Else(); | 388 { Push(Add<HConstant>(factory->type##_string())); } \ |
| 389 is_##type.Else(); { | |
|
bbudge
2015/08/17 11:58:43
I had to put the opening brace on this line to app
| |
| 390 SIMD128_TYPES(SIMD128_BUILDER_OPEN) | |
| 391 #undef SIMD128_BUILDER_OPEN | |
| 392 // Is it an undetectable object? | |
| 393 IfBuilder is_undetectable(this); | |
| 394 is_undetectable.If<HIsUndetectableAndBranch>(object); | |
| 395 is_undetectable.Then(); | |
| 389 { | 396 { |
| 390 IfBuilder is_int32x4(this); | 397 // typeof an undetectable object is 'undefined'. |
| 391 is_int32x4.If<HCompareObjectEqAndBranch>( | 398 Push(Add<HConstant>(factory->undefined_string())); |
| 392 map, Add<HConstant>(factory->int32x4_map())); | |
| 393 is_int32x4.Then(); | |
| 394 { Push(Add<HConstant>(factory->int32x4_string())); } | |
| 395 is_int32x4.Else(); | |
| 396 { | |
| 397 IfBuilder is_bool32x4(this); | |
| 398 is_bool32x4.If<HCompareObjectEqAndBranch>( | |
| 399 map, Add<HConstant>(factory->bool32x4_map())); | |
| 400 is_bool32x4.Then(); | |
| 401 { Push(Add<HConstant>(factory->bool32x4_string())); } | |
| 402 is_bool32x4.Else(); | |
| 403 { | |
| 404 IfBuilder is_int16x8(this); | |
| 405 is_int16x8.If<HCompareObjectEqAndBranch>( | |
| 406 map, Add<HConstant>(factory->int16x8_map())); | |
| 407 is_int16x8.Then(); | |
| 408 { Push(Add<HConstant>(factory->int16x8_string())); } | |
| 409 is_int16x8.Else(); | |
| 410 { | |
| 411 IfBuilder is_bool16x8(this); | |
| 412 is_bool16x8.If<HCompareObjectEqAndBranch>( | |
| 413 map, Add<HConstant>(factory->bool16x8_map())); | |
| 414 is_bool16x8.Then(); | |
| 415 { Push(Add<HConstant>(factory->bool16x8_string())); } | |
| 416 is_bool16x8.Else(); | |
| 417 { | |
| 418 IfBuilder is_int8x16(this); | |
| 419 is_int8x16.If<HCompareObjectEqAndBranch>( | |
| 420 map, Add<HConstant>(factory->int8x16_map())); | |
| 421 is_int8x16.Then(); | |
| 422 { Push(Add<HConstant>(factory->int8x16_string())); } | |
| 423 is_int8x16.Else(); | |
| 424 { | |
| 425 IfBuilder is_bool8x16(this); | |
| 426 is_bool8x16.If<HCompareObjectEqAndBranch>( | |
| 427 map, Add<HConstant>(factory->bool8x16_map())); | |
| 428 is_bool8x16.Then(); | |
| 429 { Push(Add<HConstant>(factory->bool8x16_string())); } | |
| 430 is_bool8x16.Else(); | |
| 431 { | |
| 432 // Is it an undetectable object? | |
| 433 IfBuilder is_undetectable(this); | |
| 434 is_undetectable.If<HIsUndetectableAndBranch>( | |
| 435 object); | |
| 436 is_undetectable.Then(); | |
| 437 { | |
| 438 // typeof an undetectable object is 'undefined'. | |
| 439 Push(Add<HConstant>(factory->undefined_string())); | |
|
bbudge
2015/08/17 13:03:57
I didn't notice before but I inadvertently changed
bbudge
2015/08/17 13:05:54
Ugh, never mind, I was confused reading the diff.
| |
| 440 } | |
| 441 is_undetectable.Else(); | |
| 442 { | |
| 443 // For any kind of object not handled above, the | |
| 444 // spec rule for host objects gives that it is | |
| 445 // okay to return "object". | |
| 446 Push(object_string); | |
| 447 } | |
| 448 } | |
| 449 } | |
| 450 } | |
| 451 } | |
| 452 } | |
| 453 } | |
| 454 } | 399 } |
| 400 is_undetectable.Else(); | |
| 401 { | |
| 402 // For any kind of object not handled above, the spec rule for | |
| 403 // host objects gives that it is okay to return "object". | |
| 404 Push(object_string); | |
| 405 } | |
| 406 #define SIMD128_BUILDER_CLOSE(TYPE, Type, type, lane_count, lane_type) } | |
| 407 SIMD128_TYPES(SIMD128_BUILDER_CLOSE) | |
| 408 #undef SIMD128_BUILDER_CLOSE | |
| 455 } | 409 } |
| 456 is_function.End(); | 410 is_function.End(); |
| 457 } | 411 } |
| 458 is_symbol.End(); | 412 is_symbol.End(); |
| 459 } | 413 } |
| 460 is_oddball.End(); | 414 is_oddball.End(); |
| 461 } | 415 } |
| 462 is_string.End(); | 416 is_string.End(); |
| 463 } | 417 } |
| 464 is_number.End(); | 418 is_number.End(); |
| (...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2253 return Pop(); | 2207 return Pop(); |
| 2254 } | 2208 } |
| 2255 | 2209 |
| 2256 | 2210 |
| 2257 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2211 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
| 2258 return DoGenerateCode(this); | 2212 return DoGenerateCode(this); |
| 2259 } | 2213 } |
| 2260 | 2214 |
| 2261 } // namespace internal | 2215 } // namespace internal |
| 2262 } // namespace v8 | 2216 } // namespace v8 |
| OLD | NEW |